You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

file_search.js 285B

1234567891011121314
  1. var findup = require('findup-sync');
  2. module.exports = function(search, paths) {
  3. var path;
  4. var len = paths.length;
  5. for (var i = 0; i < len; i++) {
  6. if (path) {
  7. break;
  8. } else {
  9. path = findup(search, { cwd: paths[i], nocase: true });
  10. }
  11. }
  12. return path;
  13. };