preferred-search
v1.0.0
Published
Search files by priority
Downloads
17
Readme
preferred-search
Search files by priority.
Install
npm i preferred-search
Usage
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.txt