1.0.2 • Published 5 years ago
@tww/up-resolve v1.0.2
@tww/up-resolve
Search up the directory tree from your cwd for specific files.
Installation
$ npm install --save @tww/up-resolve
Usage
Up resolve starts at the current working directory, and walks up the tree, looking for files/directories that match the string, or the regex patten.
returns an array of files that match your file pattern.
var upResolve = require('@tww/up-resolve');
console.log(upResolve(['package.json']))
// [ '/Users/ericwooley/Dropbox/projects/appgen/packages/up-resolve/package.json',
// '/Users/ericwooley/Dropbox/projects/appgen/package.json' ]
API
module.exports.resolveFS(fileNames, opts)
Kind: global function
Param | Type | Description |
---|---|---|
fileNames | Array.<(String|Regex)> | An array of file names or regex patterns to search for |
opts | Object | does nothing yet, reserved. |
License
MIT © Eric Wooley