paulmillr / readdirp

Recursive version of fs.readdir with streaming api.
https://paulmillr.com
MIT License
378 stars 51 forks source link

filterFilter and directoryFilter #184

Open Abul22 opened 2 years ago

Abul22 commented 2 years ago

Currently filterFilter and directoryFilter don't apply truly to their filters.

For more utility of this it may be wanting a flag for 'absolute' or 'ordered_in_preference'

Eg. fileFilter: ['.js','!.'] --- Currently this will return no files with a '.' -- Not even the .js ones explicitly included.

Ff it was done with ordered_in_preference - any .js files would be included (taking pref over the next rule to exclude everything

Something like fileFilter: ['.js','!.', ''] -- Would firstly allow all js files, then exclude anything with a '.', then include anything without an extension eg. README.