Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wankdanker/node-find-alternate-file
Given a file path and a list of file extensions, find a file that exists
https://github.com/wankdanker/node-find-alternate-file
Last synced: 2 months ago
JSON representation
Given a file path and a list of file extensions, find a file that exists
- Host: GitHub
- URL: https://github.com/wankdanker/node-find-alternate-file
- Owner: wankdanker
- Created: 2014-12-09T17:26:18.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-06T02:47:40.000Z (over 9 years ago)
- Last Synced: 2024-10-11T09:40:12.759Z (3 months ago)
- Language: JavaScript
- Size: 147 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
find-alternate-file
-------------------Say your are looking for index.html, but if it does not exist you are willing
to use index.jade, index.ejs or index.dust. This module will help you determine
which if any of the alternate files exist.install
-------```bash
npm install find-alternate-file
```usage
-----###async
```js
var find = require('find-alternate-file');find('index.html', ['jade', 'ejs', 'dust'], function (err, found) {
console.log(found);
});```
###sync```js
var findSync = require('find-alternate-file').findSync;console.log(findSync('index.html', ['jade', 'ejs', 'dust']));
```license
-------MIT