path-search
Search files in a path array.
Last updated 12 years ago by valeriangalliat .
Unlicense · Repository · Bugs · Original npm · Tarball · package.json
$ npm install path-search 
SYNC missed versions from official npm registry.

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;

Current Tags

  • 1.0.1                                ...           latest (12 years ago)

2 Versions

  • 1.0.1                                ...           12 years ago
  • 1.0.0                                ...           12 years ago
Maintainers (1)
Downloads
Total 2
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE