index.js
function resolve(opts, done) {
  debug('resolving paths for globs:\n', JSON.stringify(opts.globs));
  var tasks = opts.globs.map(function(pattern) {
    return function(cb) {
      debug('resolving `%s`...', pattern);
      glob(pattern, {}, function(err, files) {
        if (err) {
          return cb(err);
        }
        debug('resolved %d file(s) for `%s`', files.length, pattern);
        if (files.length > 0) {
          opts.files.push.apply(opts.files, files);
        }
        cb();
      });
    };
  });
  async.parallel(tasks, function(err) {
    if (err) {
      return done(err);
    }
    debug('checking and removing duplicate paths...');
    opts.files = unique(opts.files);
    debug('final result has `%d` files', opts.files.length);
    done(null, opts.files);
  });
}
function resolve(opts, done) {
  debug('resolving paths for globs:\n', JSON.stringify(opts.globs));
  var tasks = opts.globs.map(function(pattern) {
    return function(cb) {
      debug('resolving `%s`...', pattern);
      glob(pattern, {}, function(err, files) {
        if (err) {
          return cb(err);
        }
        debug('resolved %d file(s) for `%s`', files.length, pattern);
        if (files.length > 0) {
          opts.files.push.apply(opts.files, files);
        }
        cb();
      });
    };
  });
  async.parallel(tasks, function(err) {
    if (err) {
      return done(err);
    }
    debug('checking and removing duplicate paths...');
    opts.files = unique(opts.files);
    debug('final result has `%d` files', opts.files.length);
    done(null, opts.files);
  });
}
function resolve ( opts , done ) { debug ( 'resolving paths for globs:\n' , JSON . stringify ( opts . globs ) ) ; var tasks = opts . globs . map ( function ( pattern ) { return function ( cb ) { debug ( 'resolving `%s`...' , pattern ) ; glob ( pattern , { } , function ( err , files ) { if ( err ) { return cb ( err ) ; } debug ( 'resolved %d file(s) for `%s`' , files . length , pattern ) ; if ( files . length > 0 ) { opts . files . push . apply ( opts . files , files ) ; } cb ( ) ; } ) ; } ; } ) ; async . parallel ( tasks , function ( err ) { if ( err ) { return done ( err ) ; } debug ( 'checking and removing duplicate paths...' ) ; opts . files = unique ( opts . files ) ; debug ( 'final result has `%d` files' , opts . files . length ) ; done ( null , opts . files ) ; } ) ; }
Expand globs into paths.

@param {Object} opts
@param {Function} done
Expand globs into paths .