find-up
Install
$ npm install --save find-upUsage
/
└── Users
└── sindresorhus
├── unicorn.png
└── foo
└── bar
├── baz
└── example.js// example.js
const findUp = require('find-up');
findUp('unicorn.png').then(filepath => {
console.log(filepath);
//=> '/Users/sindresorhus/unicorn.png'
});API
findUp(filename, [options])
findUp.sync(filename, [options])
filename
options
Related
License
Last updated