locate-path
Install
$ npm install locate-pathUsage
const locatePath = require('locate-path');
const files = [
'unicorn.png',
'rainbow.png', // Only this one actually exists on disk
'pony.png'
];
(async () => {
console(await locatePath(files));
//=> 'rainbow'
})();API
locatePath(input, [options])
input
options
locatePath.sync(input, [options])
input
options
Related
License
Last updated