File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ Features
10
10
- Updated [ redis-parser] ( https://github.com/NodeRedis/redis-parser ) dependency ([ changelog] ( https://github.com/NodeRedis/redis-parser/releases/tag/v.2.0.0 ) )
11
11
- The JS parser is from now on the new default as it is a lot faster than the hiredis parser
12
12
- This is no BC as there is no changed behavior for the user at all but just a performance improvement. Explicitly requireing the Hiredis parser is still possible.
13
+ - Added name property to all Redis functions
13
14
14
15
Bugfixes
15
16
Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ commands.list.forEach(function (command) {
44
44
}
45
45
return this . internal_send_command ( command , arr , callback ) ;
46
46
} ;
47
+ Object . defineProperty ( RedisClient . prototype [ command ] , 'name' , {
48
+ value : command
49
+ } ) ;
47
50
}
48
51
49
52
// Do not override existing functions
@@ -82,5 +85,8 @@ commands.list.forEach(function (command) {
82
85
this . queue . push ( [ command , arr , callback ] ) ;
83
86
return this ;
84
87
} ;
88
+ Object . defineProperty ( Multi . prototype [ command ] , 'name' , {
89
+ value : command
90
+ } ) ;
85
91
}
86
92
} ) ;
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ function quit_callback (self, callback) {
96
96
} ;
97
97
}
98
98
99
- RedisClient . prototype . QUIT = RedisClient . prototype . quit = function ( callback ) {
99
+ RedisClient . prototype . QUIT = RedisClient . prototype . quit = function quit ( callback ) {
100
100
// TODO: Consider this for v.3
101
101
// Allow the quit command to be fired as soon as possible to prevent it landing in the offline queue.
102
102
// this.ready = this.offline_queue.length === 0;
@@ -108,7 +108,7 @@ RedisClient.prototype.QUIT = RedisClient.prototype.quit = function (callback) {
108
108
} ;
109
109
110
110
// Only works with batch, not in a transaction
111
- Multi . prototype . QUIT = Multi . prototype . quit = function ( callback ) {
111
+ Multi . prototype . QUIT = Multi . prototype . quit = function quit ( callback ) {
112
112
var self = this . _client ;
113
113
var call_on_write = function ( ) {
114
114
// If called in a multi context, we expect redis is available
You can’t perform that action at this time.
0 commit comments