Skip to content

Commit 6ad4c68

Browse files
authored
docs: fix scanIterator example in readme (#3072)
fixes: #3071
1 parent 1d824df commit 6ad4c68

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,8 @@ See the [Pub/Sub overview](https://github.com/redis/node-redis/blob/master/docs/
198198
using [async iterators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator):
199199

200200
```typescript
201-
for await (const key of client.scanIterator()) {
202-
// use the key!
203-
await client.get(key);
201+
for await (const keys of client.scanIterator()) {
202+
console.log(keys, await client.mGet(keys));
204203
}
205204
```
206205

0 commit comments

Comments
 (0)