1.0.0 • Published 8 years ago
preferred-search v1.0.0
preferred-search
Search files by priority.
Install
npm i preferred-searchUsage
const pSearch = require('preferred-search');
// pSeatch(basePath: string, searched files: Array<string>): string | null
const res = pSearch('.', [
'a.txt',
'b.txt'
]);
console.log(res); // /Users/hiroppy/preferred-search/a.txt1.0.0
8 years ago