lib/models/plugin-registry.js
function(aliasMap, config) {
    var aliases = this._flattenAliasMap(aliasMap);
    var allExcept = null;

    if (typeof config.allExcept !== 'undefined') {
      allExcept = this._castArray(config.allExcept);
      delete config.allExcept;
    }

    var keys = Object.keys(config);

    if (allExcept) {
      keys = keys.concat(allExcept);
    }

    var unknownConfigKeys = _.difference(keys, aliases);

    if (unknownConfigKeys.length) {
      this._logUnknownPlugins(unknownConfigKeys, 'config.pipeline.disabled');
    }

    var disabledMap = aliases.reduce(function(map, alias) {
      if (map[alias] === undefined) {
        if (allExcept && allExcept.length) {
          if (allExcept.indexOf(alias) >= 0) {
            map[alias] = false;
          } else {
            map[alias] = true;
          }
        } else {
          map[alias] = false;
        }
      }

      return map;
    }, config);

    return disabledMap;
  }
function(aliasMap, config) {
    var aliases = this._flattenAliasMap(aliasMap);
    var allExcept = null;

    if (typeof config.allExcept !== 'undefined') {
      allExcept = this._castArray(config.allExcept);
      delete config.allExcept;
    }

    var keys = Object.keys(config);

    if (allExcept) {
      keys = keys.concat(allExcept);
    }

    var unknownConfigKeys = _.difference(keys, aliases);

    if (unknownConfigKeys.length) {
      this._logUnknownPlugins(unknownConfigKeys, 'config.pipeline.disabled');
    }

    var disabledMap = aliases.reduce(function(map, alias) {
      if (map[alias] === undefined) {
        if (allExcept && allExcept.length) {
          if (allExcept.indexOf(alias) >= 0) {
            map[alias] = false;
          } else {
            map[alias] = true;
          }
        } else {
          map[alias] = false;
        }
      }

      return map;
    }, config);

    return disabledMap;
  }
function ( aliasMap , config ) { var aliases = this . _flattenAliasMap ( aliasMap ) ; var allExcept = null ; if ( typeof config . allExcept !== 'undefined' ) { allExcept = this . _castArray ( config . allExcept ) ; delete config . allExcept ; } var keys = Object . keys ( config ) ; if ( allExcept ) { keys = keys . concat ( allExcept ) ; } var unknownConfigKeys = _ . difference ( keys , aliases ) ; if ( unknownConfigKeys . length ) { this . _logUnknownPlugins ( unknownConfigKeys , 'config.pipeline.disabled' ) ; } var disabledMap = aliases . reduce ( function ( map , alias ) { if ( map [ alias ] === undefined ) { if ( allExcept && allExcept . length ) { if ( allExcept . indexOf ( alias ) >= 0 ) { map [ alias ] = false ; } else { map [ alias ] = true ; } } else { map [ alias ] = false ; } } return map ; } , config ) ; return disabledMap ; }
Build up a hash of disabled plugin instances, keyed by alias, with the value being whether it's disabled or not
This hash will contain an entry for every installed plugin.

If a plugin has not been referenced in `config.pipeline.disabled` then it will be added to the map as `disabled: false`.

Example return value:

{
foo: true,
bar: false
}
Build up a hash of disabled plugin instances keyed by alias with the value being whether it s disabled or not This hash will contain an entry for every installed plugin .