redis-scanner (v0.1.1) is a Node.js utility that wraps Redis SCAN, SSCAN, HSCAN, and ZSCAN commands to simplify iteration over large key sets without blocking the server. It supports both synchronous and asynchronous usage, and offers two integration methods: binding scan methods directly to a RedisClient instance, or creating standalone Scanner objects. Currently pre-1.0.0, with potential breaking changes, it is no longer actively maintained (last commit in 2016). Key differentiators: automatic cursor management, MATCH/COUNT options in `options`, and reusable Scanner objects. Not compatible with modern Redis clients; prefer `ioredis` or `node-redis` built-in scan iterators.
npm install redis-scannerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates two ways to use redis-scanner: binding scan methods to a Redis client, and creating a standalone Scanner with options like pattern and count.
Pin to an exact version (e.g., 0.1.1) and test upgrades.
Use redis v3 (npm install redis@3) or switch to built-in scanIterator in node-redis v4+.
Migrate to ioredis or node-redis v4+ scan utilities.
Always accept and call the done callback for async processing.
Create a new Scanner for each concurrent scan, or await onEnd before reusing.
Call bindScanners(client) after creating the client and before using scan/hscan/sscan/zscan.
Use require('redis-scanner').Scanner or const { Scanner } = require('redis-scanner').Use only one: either provide `args` array or use `pattern` and `count` options (not both).