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
1010- Updated [ redis-parser] ( https://github.com/NodeRedis/redis-parser ) dependency ([ changelog] ( https://github.com/NodeRedis/redis-parser/releases/tag/v.2.0.0 ) )
1111 - The JS parser is from now on the new default as it is a lot faster than the hiredis parser
1212 - 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
1314
1415Bugfixes
1516
Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ commands.list.forEach(function (command) {
4444 }
4545 return this . internal_send_command ( command , arr , callback ) ;
4646 } ;
47+ Object . defineProperty ( RedisClient . prototype [ command ] , 'name' , {
48+ value : command
49+ } ) ;
4750 }
4851
4952 // Do not override existing functions
@@ -82,5 +85,8 @@ commands.list.forEach(function (command) {
8285 this . queue . push ( [ command , arr , callback ] ) ;
8386 return this ;
8487 } ;
88+ Object . defineProperty ( Multi . prototype [ command ] , 'name' , {
89+ value : command
90+ } ) ;
8591 }
8692} ) ;
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ function quit_callback (self, callback) {
9696 } ;
9797}
9898
99- RedisClient . prototype . QUIT = RedisClient . prototype . quit = function ( callback ) {
99+ RedisClient . prototype . QUIT = RedisClient . prototype . quit = function quit ( callback ) {
100100 // TODO: Consider this for v.3
101101 // Allow the quit command to be fired as soon as possible to prevent it landing in the offline queue.
102102 // this.ready = this.offline_queue.length === 0;
@@ -108,7 +108,7 @@ RedisClient.prototype.QUIT = RedisClient.prototype.quit = function (callback) {
108108} ;
109109
110110// 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 ) {
112112 var self = this . _client ;
113113 var call_on_write = function ( ) {
114114 // If called in a multi context, we expect redis is available
You can’t perform that action at this time.
0 commit comments