You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Use first word of multi word commands
Close #363. Signed-off-by: DTrejo <david.daniel.trejo@gmail.com>
This commit is contained in:
4
index.js
4
index.js
@@ -865,7 +865,9 @@ commands = set_union(["get", "set", "setnx", "setex", "append", "strlen", "del",
|
||||
"persist", "slaveof", "debug", "config", "subscribe", "unsubscribe", "psubscribe", "punsubscribe", "publish", "watch", "unwatch", "cluster",
|
||||
"restore", "migrate", "dump", "object", "client", "eval", "evalsha"], require("./lib/commands"));
|
||||
|
||||
commands.forEach(function (command) {
|
||||
commands.forEach(function (fullCommand) {
|
||||
var command = fullCommand.split(' ')[0];
|
||||
|
||||
RedisClient.prototype[command] = function (args, callback) {
|
||||
if (Array.isArray(args) && typeof callback === "function") {
|
||||
return this.send_command(command, args, callback);
|
||||
|
Reference in New Issue
Block a user