Skip to content

Commit ec2208e

Browse files
committed
docs: use send_command for ioredis (#113)
1 parent 1ffc09f commit ec2208e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

readme.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ const limiter = rateLimit({
115115

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

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

149149
#### `prefix`
150150

0 commit comments

Comments
 (0)