Git Product home page Git Product logo

Comments (8)

akileez avatar akileez commented on June 14, 2024 1

I've been using it a lot locally and I really love the API

ME TOO!!! slowly moving it into my code base replacing other globs.

IMHO this should return dotfiles by default, and only exclude them when dot is false.

that's cool, no issues here. I was thrown off due to the readme file stating the default property for dot is set to false. Adjust the prop to true and confusion is gone. Having multiple way of accomplishing the goal is fine, I still prefer the direct method. keeps my coding simple.

I was wondering how you were doing recently and was about to say hi, your ears must have been tingling!

yes they were! been meaning to contact you as well. just started coding again about 6 months ago. Actually it was @doowb's tweet on Twitter about VS Code that got me back into coding. So thank him for me.

from readdir.

jonschlinkert avatar jonschlinkert commented on June 14, 2024 1

ME TOO!!! slowly moving it into my code base replacing other globs.

wow thanks!

Adjust the prop to true and confusion is gone

good catch!

just started coding again about 6 months ago. Actually it was @doowb's tweet on Twitter about VS Code that got me back into coding. So thank him for me.

that's awesome! I was taking a break as well. Sounds like we both had some much needed time away.

I'm sure @doowb will see this message! and it doesn't surprise me that he said something that got you coding again, he inspires me too!

from readdir.

doowb avatar doowb commented on June 14, 2024 1

I was thrown off due to the readme file stating the default property for dot is set to false. Adjust the prop to true and confusion is gone.

I think this is the case... the default should be true and the example should be updated to something like this:

const files = await readdir('.');
console.log(files);
//=> ['.DS_Store', '.git', 'LICENSE', 'README.md', 'package.json']

const files = await readdir('.', { dot: false });
console.log(files);
//=> ['LICENSE', 'README.md', 'package.json']

Then, this will also match the options.dot tests.

just started coding again about 6 months ago. Actually it was @doowb's tweet on Twitter about VS Code that got me back into coding. So thank him for me.

This is awesome! I'm glad you're coding again :)

from readdir.

akileez avatar akileez commented on June 14, 2024 1

but I looked at the dependents before I published and it looked like no one was using this besides me lol

no worries!!!!

I usually copy/paste directly from github, so it wouldn't show up in any stats. I started watching because it was that good! The symlink change happened and I copied that version as well. This is the only way I picked up the change with dot files. All three versions were running on the same data set.

If everything is fine, you are welcome to close this.

from readdir.

jonschlinkert avatar jonschlinkert commented on June 14, 2024

btw, this is absolutely awesome!!!!!!!!!!!!!!!!!!!!!!

wow thanks for the kind words! I spent way too much time on this lol. I've been using it a lot locally and I really love the API, I hope other people get some value from it!

should this be || as opposed to && or something else? (in lib/sync as well)

ha @doowb mentioned something about this too. IMHO this should return dotfiles by default, and only exclude them when dot is false. It might even make more sense to remove that feature, since there are other easy ways to exclude dotfiles, like isMatch, or pushing the files into your own array inside onFile, etc.

Thoughts?

Thanks again! I was wondering how you were doing recently and was about to say hi, your ears must have been tingling!

from readdir.

jonschlinkert avatar jonschlinkert commented on June 14, 2024

@akileez I added some examples to the readme in case it might come in handy. The examples show pretty much exactly how I personally use this lib.

from readdir.

akileez avatar akileez commented on June 14, 2024

thanks @jonschlinkert. already using isMatch, just didn't realize though.

the last version it was called filter. So thanks for the heads up, I missed that one. had to look back at the documentation. filter is what originally caught my attention and I began using. It gave me a way to transpose globs by doing something like a glob-to-regex/string-to-regex conversion.

the on functions [onEach, onFile, etc] are like snipper/ninja tools to me. when I need something specific I will use them, otherwise the isMatch is the goto. see image for my typical all around collection usage.

and thanks again @doowb! ur the man!

rsync-gzip-proc3

from readdir.

jonschlinkert avatar jonschlinkert commented on June 14, 2024

the last version it was called filter. So thanks for the heads up,

I'm so sorry, I know how lame this sounds but I looked at the dependents before I published and it looked like no one was using this besides me lol. So my brain wasn't in the the right place for writing a changelog. When you said you were using it, I should have updated the changelog!

I'll get something put together, but I don't think there are that many changes besides what we talked about already. I just wanted to get the API tightened up.

see image for my typical all around collection usage.

looks perfect to me!

from readdir.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.