1.0.0 • Published 7 years ago

find-shallow-file v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

find-shallow-file

Finds a matching file as shallowly as possile in a given directory.

usage

Search for index.* in someDirectory, searching up to 10 directories deep.

findShallowestFile('someDirectory', /index\..*?/, {maxDepth: 10}, function(error, result){

    // cant error.

    // result will be either null or a path to the shallowest file that matched the regex.

});

See the tests for more examples.