From fbfa6716948ac50abc35a18ac2c777ca4f6c701f Mon Sep 17 00:00:00 2001 From: Nikolay Karadzhov Date: Mon, 1 Sep 2025 11:15:38 +0300 Subject: [PATCH] docs: fix scanIterator example in readme fixes: #3071 --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 05c55985b3..1789a51d37 100644 --- a/README.md +++ b/README.md @@ -198,9 +198,8 @@ See the [Pub/Sub overview](https://github.com/redis/node-redis/blob/master/docs/ using [async iterators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator): ```typescript -for await (const key of client.scanIterator()) { - // use the key! - await client.get(key); +for await (const keys of client.scanIterator()) { + console.log(keys, await client.mGet(keys)); } ```