lib/definitions/aggregate.js
function (name, version) {
    if (!name || !_.isString(name)) {
      var err = new Error('Please pass a valid string as name!');
      debug(err);
      throw err;
    }

    version = version || 0;

    if (!_.isNumber(version)) {
      var err = new Error('Please pass a valid number as version!');
      debug(err);
      throw err;
    }

    return _.find(this.events, function (evt) {
      return evt.name === name && evt.version === version;
    });
  }
function (name, version) {
    if (!name || !_.isString(name)) {
      var err = new Error('Please pass a valid string as name!');
      debug(err);
      throw err;
    }

    version = version || 0;

    if (!_.isNumber(version)) {
      var err = new Error('Please pass a valid number as version!');
      debug(err);
      throw err;
    }

    return _.find(this.events, function (evt) {
      return evt.name === name && evt.version === version;
    });
  }
function ( name , version ) { if ( ! name || ! _ . isString ( name ) ) { var err = new Error ( 'Please pass a valid string as name!' ) ; debug ( err ) ; throw err ; } version = version || 0 ; if ( ! _ . isNumber ( version ) ) { var err = new Error ( 'Please pass a valid number as version!' ) ; debug ( err ) ; throw err ; } return _ . find ( this . events , function ( evt ) { return evt . name === name && evt . version === version ; } ) ; }
Returns the event module by event name and event version.
@param {String} name    The event name.
@param {Number} version The event version. [optional; default 0]
@returns {Event}
Returns the event module by event name and event version .