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.
- Host: GitHub
- URL: https://github.com/hiroppy/preferred-search
- Owner: hiroppy
- Created: 2018-05-04T06:30:15.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-08-17T02:58:12.000Z (almost 6 years ago)
- Last Synced: 2025-02-28T19:03:59.060Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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
```