lib/definitions/context.js
function (name) {
    if (!name || !_.isString(name)) {
      throw new Error('Please pass in an aggregate name!');
    }

    return _.find(this.aggregates, function (agg) {
      return agg.name === name;
    });
  }
function (name) {
    if (!name || !_.isString(name)) {
      throw new Error('Please pass in an aggregate name!');
    }

    return _.find(this.aggregates, function (agg) {
      return agg.name === name;
    });
  }
function ( name ) { if ( ! name || ! _ . isString ( name ) ) { throw new Error ( 'Please pass in an aggregate name!' ) ; } return _ . find ( this . aggregates , function ( agg ) { return agg . name === name ; } ) ; }
Returns the aggregate with the requested name.
@param {String} name command name
@returns {Aggregate}
Returns the aggregate with the requested name .