You've already forked node-redis
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:
4
index.js
4
index.js
@@ -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");
|
||||
|
Reference in New Issue
Block a user