diff --git a/documentation/index.html b/documentation/index.html index 5c7c79467f..a223b7efa2 100644 --- a/documentation/index.html +++ b/documentation/index.html @@ -107,7 +107,7 @@ connection. However, there was no way to use the pool without a "main"
See the Pub/Sub overview.
SCAN results can be looped over
using async iterators:
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));
}
This works with HSCAN, SSCAN, and ZSCAN too:
for await (const { field, value } of client.hScanIterator("hash")) {
}
for await (const member of client.sScanIterator("set")) {
}
for await (const { score, value } of client.zScanIterator("sorted-set")) {
}