Skip to content

Instantly share code, notes, and snippets.

@doowb
Created March 27, 2014 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doowb/9797886 to your computer and use it in GitHub Desktop.
Save doowb/9797886 to your computer and use it in GitHub Desktop.
Finding the first valid file from a collection of files using findup-sync and koalas
const findup = require('findup-sync');
const koalas = require('koalas');
module.exports = function (search, paths) {
var find = function (path) {
return findup(search, {cwd: path, nocase: true});
};
return koalas.apply(null, paths).use(find).value();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment