José Quiñones Flores 4564da0130 Added Laravel project and removed sensitive data | 4 years ago | |
---|---|---|
.. | ||
index.js | 4 years ago | |
license | 4 years ago | |
package.json | 4 years ago | |
readme.md | 4 years ago |
Find a file by walking up parent directories
$ npm install --save find-up
/
└── 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'
});
Returns a promise for the filepath or null
.
Returns a filepath or null
.
Type: string
Filename of the file to find.
Type: string
Default: process.cwd()
Directory to start from.
MIT © Sindre Sorhus