lib/index.js
function resolve(importee, imports) {
  return firstOf(imports, ({root, extension}, done) => {
    const file = path.join(root, importee + extension);
    fs.stat(file, (err, stats) => {
      if (!err && stats.isFile()) done(null, file);
      else done(null, null);
    });
  });
}
function resolve(importee, imports) {
  return firstOf(imports, ({root, extension}, done) => {
    const file = path.join(root, importee + extension);
    fs.stat(file, (err, stats) => {
      if (!err && stats.isFile()) done(null, file);
      else done(null, null);
    });
  });
}
function resolve ( importee , imports ) { return firstOf ( imports , ( { root , extension } , done ) => { const file = path . join ( root , importee + extension ) ; fs . stat ( file , ( err , stats ) => { if ( ! err && stats . isFile ( ) ) done ( null , file ) ; else done ( null , null ) ; } ) ; } ) ; }
Asynchronously resolve a module to an absolute path given a set of places to
look.

@param {String} importee The id of the module, relative to one of the
specified imports.
@param {Array<Import>} imports The import objects.
@return {Promise<?String>} The resolved module.
Asynchronously resolve a module to an absolute path given a set of places to look .