Skip to content

Commit

Permalink
Merge branch 'master' into improve-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gkorland committed Mar 4, 2021
2 parents c42841a + 685a72d commit 3c8ff5c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Expand Up @@ -395,7 +395,7 @@ responses using JavaScript syntax.
```js
client.hmset("key", "foo", "bar", "hello", "world");

client.hgetall("hosts", function(err, value) {
client.hgetall("key", function(err, value) {
console.log(value.foo); // > "bar"
console.log(value.hello); // > "world"
});
Expand Down Expand Up @@ -639,7 +639,7 @@ client.watch("foo", function(watchError) {
* If err is null, it means Redis successfully attempted
* the operation.
*/
if (execError) throw err;
if (execError) throw execError;

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

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

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

### `client.send_command(command_name[, [args][, callback]])`
### `client.sendCommand(command_name[, [args][, callback]])`

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

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

### `redis.add_command(command_name)`
### `redis.addCommand(command_name)`

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

Expand Down

0 comments on commit 3c8ff5c

Please sign in to comment.