lib/config.js
function () {
      var pkgs = this.pkgs;
      var configNames = _.chain(pkgs)
        .map(function (pkg) { return _.keys(pkg.config); })
        .flatten()
        .uniq()
        .value();

      // Take "first" config value in arrays as "winning" value.
      return _.chain(configNames)
        .map(function (name) {
          return [name, _.find(pkgs, function (pkg) {
            return _.has(pkg.config, name);
          }).config[name]];
        })
        // Object.
        .reduce(function (memo, pair) {
          memo[pair[0]] = pair[1];
          return memo;
        }, {})
        .value();
    }
function () {
      var pkgs = this.pkgs;
      var configNames = _.chain(pkgs)
        .map(function (pkg) { return _.keys(pkg.config); })
        .flatten()
        .uniq()
        .value();

      // Take "first" config value in arrays as "winning" value.
      return _.chain(configNames)
        .map(function (name) {
          return [name, _.find(pkgs, function (pkg) {
            return _.has(pkg.config, name);
          }).config[name]];
        })
        // Object.
        .reduce(function (memo, pair) {
          memo[pair[0]] = pair[1];
          return memo;
        }, {})
        .value();
    }
function ( ) { var pkgs = this . pkgs ; var configNames = _ . chain ( pkgs ) . map ( function ( pkg ) { return _ . keys ( pkg . config ) ; } ) . flatten ( ) . uniq ( ) . value ( ) ; // Take "first" config value in arrays as "winning" value. return _ . chain ( configNames ) . map ( function ( name ) { return [ name , _ . find ( pkgs , function ( pkg ) { return _ . has ( pkg . config , name ) ; } ) . config [ name ] ] ; } ) // Object. . reduce ( function ( memo , pair ) { memo [ pair [ 0 ] ] = pair [ 1 ] ; return memo ; } , { } ) . value ( ) ; }
Return object of resolved package.json config fields.

Resolves in order of "root wins", then in reverse archetype order.

@returns {Object} environment object.
Return object of resolved package . json config fields .