A streaming interface for Redis SCAN, SSCAN, HSCAN, and ZSCAN commands. Version 1.0.3 (last updated in 2017). It monkey-patches the node_redis client's *SCAN methods to return Node.js streams (Readable) instead of using callbacks, enabling easier consumption via pipe or stream libraries like terminus. This package is specific to node_redis and does not work with ioredis. It has no active maintenance and no TypeScript definitions. Suitable for scanning large datasets without blocking the event loop, but consider alternatives like ioredis which includes built-in scan streams.
npm install redis-scanstreamsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Patches node_redis client to use streaming SCAN, logs matched keys.
Apply the patch early in your application before creating any redis clients, or be aware that existing clients are not affected.
Use ioredis which has built-in scan streams, or use node_redis.
Consider using ioredis with its built-in scanStream() methods for better performance and maintenance.
Ensure you call require('redis-scanstreams')(redis) before creating a client.Start Redis server or set the REDIS_URL environment variable to a valid connection string.
Use .on('data', ({key, value}) => ...) or .map(({key, value}) => ...).