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.commands, function (cmd) {
      return cmd.name === name && cmd.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.commands, function (cmd) {
      return cmd.name === name && cmd.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 . commands , function ( cmd ) { return cmd . name === name && cmd . version === version ; } ) ; }
Returns the command module by command name and command version.
@param {String} name    The command name.
@param {Number} version The command version. [optional; default 0]
@returns {Command}
Returns the command module by command name and command version .