You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Jack Lukic 5ae9830b91 tweaks sizes of icons 12 years ago
..
lib grunt -- update and add bower and watch. 12 years ago
node_modules grunt -- update and add bower and watch. 12 years ago
test grunt -- update and add bower and watch. 12 years ago
.jshintrc grunt -- update and add bower and watch. 12 years ago
.npmignore grunt -- update and add bower and watch. 12 years ago
Gruntfile.js grunt -- update and add bower and watch. 12 years ago
LICENSE-MIT grunt -- update and add bower and watch. 12 years ago
README.md grunt -- update and add bower and watch. 12 years ago
package.json grunt -- update and add bower and watch. 12 years ago

README.md

findup-sync

Find the first file matching a given pattern in the current directory or the nearest ancestor directory.

Getting Started

Install the module with: npm install findup-sync

var findup = require('findup-sync');

// Start looking in the CWD.
var filepath1 = findup('{a,b}*.txt');

// Start looking somewhere else, and ignore case (probably a good idea).
var filepath2 = findup('{a,b}*.txt', {cwd: '/some/path', nocase: true});

Usage

findup(patternOrPatterns [, minimatchOptions])

patternOrPatterns

Type: String or Array
Default: none

One or more wildcard glob patterns. Or just filenames.

minimatchOptions

Type: Object
Default: {}

Options to be passed to minimatch.

Note that if you want to start in a different directory than the current working directory, specify a cwd property here.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

2013-03-08 - v0.1.2 - Updated dependencies. Fixed a Node 0.9.x bug. Updated unit tests to work cross-platform.
2012-11-15 - v0.1.1 - Now works without an options object.
2012-11-01 - v0.1.0 - Initial release.