79176107

Date: 2024-11-11 00:43:54
Score: 1
Natty:
Report link

Now there is a scanIterator() function in the redis client library that returns an async generator.

This makes it a lot easier to iterate over records using the for await syntax.

for await (const key of client.scanIterator({ MATCH: 'key-prefix:*' }) {
    console.log(key);
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Zicklag