Home

Awesome

<p align="center"> <a href="http://gulpjs.com"> <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png"> </a> </p>

findup-sync

NPM version Downloads Build Status Coveralls Status

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

Matching is done with micromatch, please report any matching related issues on that repository.

Usage

var findup = require('findup-sync');
findup(patternOrPatterns [, micromatchOptions]);

// 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});

API

findup(patterns, [options])

License

MIT

<!-- prettier-ignore-start --> <!-- prettier-ignore-nd --> <!-- prettier-ignore-start --> <!-- prettier-ignore-nd -->