find-alternate-file

1.0.5 • Public • Published

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

npm install find-alternate-file

usage

async

var find = require('find-alternate-file');
 
find('index.html', ['jade', 'ejs', 'dust'], function (err, found) {
    console.log(found);
});
 

sync

var findSync = require('find-alternate-file').findSync;
 
console.log(findSync('index.html', ['jade', 'ejs', 'dust']));

license

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.5
    117
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.5
    117
  • 1.0.4
    0
  • 1.0.3
    0
  • 1.0.2
    0

Package Sidebar

Install

npm i find-alternate-file

Weekly Downloads

117

Version

1.0.5

License

MIT

Last publish

Collaborators

  • wankdanker