Skip to content

themeleon/path-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

path-search npm version

Search files in a path array.

Examples

.
├── parent
│   ├── index.html
│   ├── main.css
│   └── main.js
└── child
    ├── index.html
    └── main.css
var pathSearch = require('path-search');
var path = ['child', 'parent'];

pathSearch(path, 'index.html') === 'child/index.html';
pathSearch(path, 'main.css') === 'child/main.css';
pathSearch(path, 'main.js') === 'parent/main.js';
pathSearch(path, 'troll') === undefined;

About

Search files in a path array.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published