1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Simplify lowercase command prototype.

Suggested by Rasmus Andersson
This commit is contained in:
Matt Ranney
2010-09-30 09:02:20 -07:00
parent b4f5891da3
commit 8356ecfda8

View File

@@ -699,12 +699,7 @@ exports.commands.forEach(function (command) {
args.unshift(command); // put command at the beginning
this.send_command.apply(this, args);
};
// same as above, but command is lower case
RedisClient.prototype[command.toLowerCase()] = function () {
var args = to_array(arguments);
args.unshift(command); // put command at the beginning
this.send_command.apply(this, args);
};
RedisClient.prototype[command.toLowerCase()] = RedisClient.prototype[command];
});
function Multi(client, args) {