An open API service indexing awesome lists of open source software.

https://github.com/hiroppy/preferred-search

Search files by priority.
https://github.com/hiroppy/preferred-search

Last synced: about 1 month ago
JSON representation

Search files by priority.

Awesome Lists containing this project

README

          

# preferred-search

Search files by priority.

## Install
```sh
npm i preferred-search
```

## Usage
```js
const pSearch = require('preferred-search');

// pSeatch(basePath: string, searched files: Array): string | null
const res = pSearch('.', [
'a.txt',
'b.txt'
]);

console.log(res); // /Users/hiroppy/preferred-search/a.txt
```