Created
March 27, 2014 01:18
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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