lib/Master.js
/**
 * Validate the given command. If validation fails, a type error is thrown.
 * @param {String|Number|Symbol} command The command to validate.
 * @return {String|Symbol} The validated command.
 */
Validate the given command. If validation fails, a type error is thrown.
@param {String|Number|Symbol} command The command to validate.
@return {String|Symbol} The validated command.
Validate the given command . If validation fails a type error is thrown . @param { String|Number|Symbol } command The command to validate . @return { String|Symbol } The validated command .
function validateCommand(command) {
  if (!(typeof command === 'string' || typeof command === 'symbol' || typeof command === 'number')) {
    throw new TypeError(
      `Task command must be a string, number, or symbol, but got ${typeof command}.`
    );
  }
  if (typeof command === 'number') command = command.toString();
  return command;
}
function validateCommand ( command ) { if ( ! ( typeof command === 'string' || typeof command === 'symbol' || typeof command === 'number' ) ) { throw new TypeError ( ` ${ typeof command } ` ) ; } if ( typeof command === 'number' ) command = command . toString ( ) ; return command ; }
Validate the given command.
Validate the given command .