index.js
function resolve(files, opts) {
  var fn = opts.filter || function(fp) {
    return true;
  };

  if (opts.realpath === true) {
    return files.filter(fn);
  }

  var len = files.length;
  var idx = -1;
  var res = [];

  while (++idx < len) {
    var fp = path.resolve(opts.cwd, files[idx]);
    if (!fn(fp) || ~res.indexOf(fp)) continue;
    res.push(fp);
  }
  return res;
}
function resolve(files, opts) {
  var fn = opts.filter || function(fp) {
    return true;
  };

  if (opts.realpath === true) {
    return files.filter(fn);
  }

  var len = files.length;
  var idx = -1;
  var res = [];

  while (++idx < len) {
    var fp = path.resolve(opts.cwd, files[idx]);
    if (!fn(fp) || ~res.indexOf(fp)) continue;
    res.push(fp);
  }
  return res;
}
function resolve ( files , opts ) { var fn = opts . filter || function ( fp ) { return true ; } ; if ( opts . realpath === true ) { return files . filter ( fn ) ; } var len = files . length ; var idx = - 1 ; var res = [ ] ; while ( ++ idx < len ) { var fp = path . resolve ( opts . cwd , files [ idx ] ) ; if ( ! fn ( fp ) || ~ res . indexOf ( fp ) ) continue ; res . push ( fp ) ; } return res ; }
Resolve the absolute path to a file using the given cwd.
Resolve the absolute path to a file using the given cwd .