docs: 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;
  }