lib/defaultCommandHandler.js
function (cmd, callback) {
    if (!cmd || !_.isObject(cmd)) {
      debug(err);
      return callback(new Error('Please pass a valid command!'), null);
    }
    return this.aggregate.validateCommand(cmd, callback);
  }
function (cmd, callback) {
    if (!cmd || !_.isObject(cmd)) {
      debug(err);
      return callback(new Error('Please pass a valid command!'), null);
    }
    return this.aggregate.validateCommand(cmd, callback);
  }
function ( cmd , callback ) { if ( ! cmd || ! _ . isObject ( cmd ) ) { debug ( err ) ; return callback ( new Error ( 'Please pass a valid command!' ) , null ) ; } return this . aggregate . validateCommand ( cmd , callback ) ; }
Returns an error if the command is not valid.
@param {Object} cmd The command.
@returns {ValidationError}
Returns an error if the command is not valid .