Skip to content

Commit 3c8ff5c

Browse files
authoredMar 4, 2021
Merge branch 'master' into improve-docs
2 parents c42841a + 685a72d commit 3c8ff5c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed
 

‎README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ responses using JavaScript syntax.
395395
```js
396396
client.hmset("key", "foo", "bar", "hello", "world");
397397

398-
client.hgetall("hosts", function(err, value) {
398+
client.hgetall("key", function(err, value) {
399399
console.log(value.foo); // > "bar"
400400
console.log(value.hello); // > "world"
401401
});
@@ -639,7 +639,7 @@ client.watch("foo", function(watchError) {
639639
* If err is null, it means Redis successfully attempted
640640
* the operation.
641641
*/
642-
if (execError) throw err;
642+
if (execError) throw execError;
643643

644644
/**
645645
* If results === null, it means that a concurrent client
@@ -676,7 +676,7 @@ clients.watcher.watch("foo", function(watchError) {
676676

677677
// if you comment out the next line, the transaction will work
678678
clients.modifier.set("foo", Math.random(), setError => {
679-
if (setError) throw err;
679+
if (setError) throw setError;
680680
});
681681

682682
// using a setTimeout here to ensure that the MULTI/EXEC will come after the SET.
@@ -848,19 +848,19 @@ non-blocking ones may be queued up until after the blocking ones finish.
848848
Another reason to use duplicate() is when multiple DBs on the same server are
849849
accessed via the redis SELECT command. Each DB could use its own connection.
850850

851-
### `client.send_command(command_name[, [args][, callback]])`
851+
### `client.sendCommand(command_name[, [args][, callback]])`
852852

853853
All Redis commands have been added to the `client` object. However, if new
854854
commands are introduced before this library is updated or if you want to add
855-
individual commands you can use `send_command()` to send arbitrary commands to
855+
individual commands you can use `sendCommand()` to send arbitrary commands to
856856
Redis.
857857

858858
All commands are sent as multi-bulk commands. `args` can either be an Array of
859859
arguments, or omitted / set to undefined.
860860

861-
### `redis.add_command(command_name)`
861+
### `redis.addCommand(command_name)`
862862

863-
Calling add_command will add a new command to the prototype. The exact command
863+
Calling addCommand will add a new command to the prototype. The exact command
864864
name will be used when calling using this new command. Using arbitrary arguments
865865
is possible as with any other command.
866866

0 commit comments

Comments
 (0)
Please sign in to comment.