File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -705,7 +705,6 @@ accessed via the redis SELECT command. Each DB could use its own connection.
705705
706706All Redis commands have been added to the ` client ` object. However, if new commands are introduced before this library is updated,
707707you can use ` send_command() ` to send arbitrary commands to Redis.
708- The command_name has to be lower case.
709708
710709All commands are sent as multi-bulk commands. ` args ` can either be an Array of arguments, or omitted / set to undefined.
711710
Original file line number Diff line number Diff line change 11# Changelog
22
3- ## v.2.7.2 - 14 Mar, 2017
3+ ## v.2.8.0 - 20 Jul, 2017
4+
5+ Features
6+
7+ - Accept UPPER_CASE commands in send_command
48
59Bugfixes
610
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ RedisClient.prototype.send_command = RedisClient.prototype.sendCommand = functio
1616 if ( typeof command !== 'string' ) {
1717 throw new TypeError ( 'Wrong input type "' + ( command !== null && command !== undefined ? command . constructor . name : command ) + '" for command name' ) ;
1818 }
19+ command = command . toLowerCase ( ) ;
1920 if ( ! Array . isArray ( args ) ) {
2021 if ( args === undefined || args === null ) {
2122 args = [ ] ;
@@ -32,9 +33,9 @@ RedisClient.prototype.send_command = RedisClient.prototype.sendCommand = functio
3233
3334 // Using the raw multi command is only possible with this function
3435 // If the command is not yet added to the client, the internal function should be called right away
35- // Otherwise we need to redirect the calls to make sure the interal functions don't get skipped
36+ // Otherwise we need to redirect the calls to make sure the internal functions don't get skipped
3637 // The internal functions could actually be used for any non hooked function
37- // but this might change from time to time and at the moment there's no good way to distinguishe them
38+ // but this might change from time to time and at the moment there's no good way to distinguish them
3839 // from each other, so let's just do it do it this way for the time being
3940 if ( command === 'multi' || typeof this [ command ] !== 'function' ) {
4041 return this . internal_send_command ( new Command ( command , args , callback ) ) ;
You can’t perform that action at this time.
0 commit comments