node-yaff
Yet Another Files Finder in Node. Provide a unique way to walk through specific directories and find all matched files.
API
dirs extensions ignore native; Finderprototypefind: Promise; Finder: void; Finder: void;
dirs:Array|String|undefined
directories to be scanned. Defaults to '.'
extensions:Array|String|undefined
file extensions to be matched. Defaults to '*'
ignore:Function|undefined
ignore function that accept a filePath and decide whether ignore it or not
native: boolean|undefined
use shell or node logic
Usage
Currently node-yaff only used for programmatically.
example one
find all files in current working directory:
const Finder = ;const f = './' /* '*' also make sense */;f
example two
find all js files in current working directory:
const Finder = ;const f = './' '.js';f
example three
find all files do not have special character:
const Finder = ;const f = './' '*' /s$/;f