From 1c1c4ea446ecdd4dd4a04bd76f992b8224c16608 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Fri, 4 Sep 2015 18:55:10 +0200 Subject: [PATCH] Update readme about lower case commands --- README.md | 6 +++--- index.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index caeefe5a74..488d64c862 100644 --- a/README.md +++ b/README.md @@ -551,9 +551,9 @@ the second word as first parameter: ## client.send_command(command_name, args, callback) -Used internally to send commands to Redis. For convenience, nearly all commands that are published on the Redis -Wiki have been added to the `client` object. However, if I missed any, or if new commands are introduced before -this library is updated, you can use `send_command()` to send arbitrary commands to Redis. +Used internally to send commands to Redis. Nearly all Redis commands have been added to the `client` object. +However, if new commands are introduced before this library is updated, you can use `send_command()` to send arbitrary commands to Redis. +The command has to be lower case. All commands are sent as multi-bulk commands. `args` can either be an Array of arguments, or omitted. diff --git a/index.js b/index.js index a01073df98..7b1ea0345a 100644 --- a/index.js +++ b/index.js @@ -692,7 +692,7 @@ function Command(command, args, sub_command, buffer_args, callback) { } RedisClient.prototype.send_command = function (command, args, callback) { - var arg, command_obj, i, il, elem_count, buffer_args, stream = this.stream, command_str = "", buffered_writes = 0, last_arg_type, lcaseCommand; + var arg, command_obj, i, il, elem_count, buffer_args, stream = this.stream, command_str = "", buffered_writes = 0, last_arg_type; if (typeof command !== "string") { throw new Error("First argument to send_command must be the command name string, not " + typeof command);