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

EVAL: allow parameters as an array. Close #368.

Signed-off-by: DTrejo <david.daniel.trejo@gmail.com>
This commit is contained in:
DTrejo
2013-02-23 22:04:46 -05:00
parent f3c298d088
commit 938c0526a0
3 changed files with 18 additions and 0 deletions

View File

@@ -1074,6 +1074,10 @@ RedisClient.prototype.eval = RedisClient.prototype.EVAL = function () {
callback = args.pop();
}
if (Array.isArray(args[0])) {
args = args[0];
}
// replace script source with sha value
var source = args[0];
args[0] = crypto.createHash("sha1").update(source).digest("hex");