index.js
function tryRequireEach(paths) {
  let result;

  while (!result && paths.length) {
    result = tryRequire(paths.shift());
  }

  return result;
}
function tryRequireEach(paths) {
  let result;

  while (!result && paths.length) {
    result = tryRequire(paths.shift());
  }

  return result;
}
function tryRequireEach ( paths ) { let result ; while ( ! result && paths . length ) { result = tryRequire ( paths . shift ( ) ) ; } return result ; }
Try to get a module, or return false.

@param {[string]} paths  Possible paths to find their module.
@returns {object|false}
Try to get a module or return false .