lib/defaultCommandHandler.js
function (aggId, cmd) {
    if (!aggId || !_.isString(aggId)) {
      var err = new Error('Please pass a valid aggregate id!');
      debug(err);
      throw err;
    }

    _.remove(this.queue[aggId], function (c) {
      return c.command === cmd;
    });
  }
function (aggId, cmd) {
    if (!aggId || !_.isString(aggId)) {
      var err = new Error('Please pass a valid aggregate id!');
      debug(err);
      throw err;
    }

    _.remove(this.queue[aggId], function (c) {
      return c.command === cmd;
    });
  }
function ( aggId , cmd ) { if ( ! aggId || ! _ . isString ( aggId ) ) { var err = new Error ( 'Please pass a valid aggregate id!' ) ; debug ( err ) ; throw err ; } _ . remove ( this . queue [ aggId ] , function ( c ) { return c . command === cmd ; } ) ; }
Removes the passed command from the queue.
@param {String} aggId The passed aggregate id.
@param {Object} cmd   The command to be queued.
Removes the passed command from the queue .