lib/conn.js
function adjustCommandArgument(argObj) {
  if (typeof argObj === "number") {
    return argObj.toString()
  } else if (typeof argObj === "string") {
    return argObj
  } else if (!argObj) {
    return ""
  } else {
    throw new RedisCommandError(`Argument: ${inspect(argObj)}`)
  }
}
function adjustCommandArgument(argObj) {
  if (typeof argObj === "number") {
    return argObj.toString()
  } else if (typeof argObj === "string") {
    return argObj
  } else if (!argObj) {
    return ""
  } else {
    throw new RedisCommandError(`Argument: ${inspect(argObj)}`)
  }
}
function adjustCommandArgument ( argObj ) { if ( typeof argObj === "number" ) { return argObj . toString ( ) } else if ( typeof argObj === "string" ) { return argObj } else if ( ! argObj ) { return "" } else { throw new RedisCommandError ( ` ${ inspect ( argObj ) } ` ) } }
Only strings and numbers are valid redis arguments, other type of data
will be treated as error.
Only strings and numbers are valid redis arguments other type of data will be treated as error .