Skip to content

Commit

Permalink
docs: use send_command for ioredis (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
gamemaker1 committed Feb 23, 2024
1 parent 1ffc09f commit ec2208e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ const limiter = rateLimit({

// Redis store configuration
store: new RedisStore({
// @ts-expect-error - Known issue: the `call` function is not present in @types/ioredis
sendCommand: (...args: string[]) => client.call(...args),
sendCommand: (command: string, ...args: string[]) =>
client.send_command(command, ...args),
}),
})
app.use(limiter)
Expand All @@ -136,15 +136,15 @@ follows:
The raw command sending function varies from library to library; some are given
below:

| Library | Function |
| ------------------------------------------------------------------ | ----------------------------------------------------------------- |
| [`node-redis`](https://github.com/redis/node-redis) | `async (...args: string[]) => client.sendCommand(args)` |
| [`ioredis`](https://github.com/luin/ioredis) | `async (...args: string[]) => client.call(...args)` |
| [`handy-redis`](https://github.com/mmkal/handy-redis) | `async (...args: string[]) => client.nodeRedis.sendCommand(args)` |
| [`tedis`](https://github.com/silkjs/tedis) | `async (...args: string[]) => client.command(...args)` |
| [`redis-fast-driver`](https://github.com/h0x91b/redis-fast-driver) | `async (...args: string[]) => client.rawCallAsync(args)` |
| [`yoredis`](https://github.com/djanowski/yoredis) | `async (...args: string[]) => (await client.callMany([args]))[0]` |
| [`noderis`](https://github.com/wallneradam/noderis) | `async (...args: string[]) => client.callRedis(...args)` |
| Library | Function |
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------- |
| [`node-redis`](https://github.com/redis/node-redis) | `async (...args: string[]) => client.sendCommand(args)` |
| [`ioredis`](https://github.com/luin/ioredis) | `async (command: string, ...args: string[]) => client.send_command(command, ...args)` |
| [`handy-redis`](https://github.com/mmkal/handy-redis) | `async (...args: string[]) => client.nodeRedis.sendCommand(args)` |
| [`tedis`](https://github.com/silkjs/tedis) | `async (...args: string[]) => client.command(...args)` |
| [`redis-fast-driver`](https://github.com/h0x91b/redis-fast-driver) | `async (...args: string[]) => client.rawCallAsync(args)` |
| [`yoredis`](https://github.com/djanowski/yoredis) | `async (...args: string[]) => (await client.callMany([args]))[0]` |
| [`noderis`](https://github.com/wallneradam/noderis) | `async (...args: string[]) => client.callRedis(...args)` |

#### `prefix`

Expand Down

0 comments on commit ec2208e

Please sign in to comment.