1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00

Add name property to all Redis functions

This commit is contained in:
Ruben Bridgewater
2016-05-27 16:25:59 +02:00
parent 55528d8b1b
commit ffaaf0f6d5
3 changed files with 9 additions and 2 deletions

View File

@@ -44,6 +44,9 @@ commands.list.forEach(function (command) {
}
return this.internal_send_command(command, arr, callback);
};
Object.defineProperty(RedisClient.prototype[command], 'name', {
value: command
});
}
// Do not override existing functions
@@ -82,5 +85,8 @@ commands.list.forEach(function (command) {
this.queue.push([command, arr, callback]);
return this;
};
Object.defineProperty(Multi.prototype[command], 'name', {
value: command
});
}
});