scan-directory
v2.0.0
Published
[](https://nodei.co/npm/scan-directory/)
Readme
Blazing fast directory scan. Uses async/await underneath, doing all the stuff in async and parallel way.
#Usage
import scan, {forExt} from 'scan-directory';
const list = await scan(
directory: string,
acceptFunction,
[rejectFunction=skipNodeModules]
);For example
const list = await scan(
__dirName, // where
forExt('js'), // what
(fileName) => fileName.match(somePattern)) // what NOTWhere acceptFunction and rejectFunction - (fileName:string, stat) => boolean.
Node 8?
scan-directory is bundled for node 10.
For older node versions use scan-directory/cjs entry point (no async/await)

