@tww/up-resolve

1.0.2 • Public • Published

@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

Readme

Keywords

none

Package Sidebar

Install

npm i @tww/up-resolve

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

72.7 kB

Total Files

5

Last publish

Collaborators

  • ericwooley
  • tww-ericwooley