1.0.2 • Published 5 years ago

@tww/up-resolve v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@tww/up-resolve npm version

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

ParamTypeDescription
fileNamesArray.<(String|Regex)>An array of file names or regex patterns to search for
optsObjectdoes nothing yet, reserved.

License

MIT © Eric Wooley