Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@tww/up-resolve

thewooleyway20MIT1.0.2

Search up the directory tree from your cwd for specific files.

readme

@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

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