Registry / database / redis-stream

redis-stream

JSON →
library0.1.0jsnpmunverified

Create arbitrary Node.js streams to and from Redis. Version 0.1.0 is the latest stable release. This package allows you to treat Redis commands as streams, enabling piping and transformation of Redis data using Node.js stream APIs. It provides a Redis constructor, a method to create command-specific streams, and parse utilities for handling Redis protocol responses. Key differentiators include built-in stream parsing for hgetall and direct network stream access.

npm install redis-stream
INSTALL
IMPORT
SIG · REDIS-STREAM
R
redis-stream
databasejavascriptv0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Redis
var Redis = require('redis-stream')
import Redis from 'redis-stream'
CJS only; no ESM support.
Redis.parse.hgetall
var Redis = require('redis-stream'); Redis.parse.hgetall()
require('redis-stream').hgetall()
Accessed via Redis.parse static object.
Redis.parse (function)
var Redis = require('redis-stream'); Redis.parse(['info'])
Redis.parse.info()
Redis.parse is a function for encoding commands.

Demonstrates creating a Redis client, obtaining a stream for LPUSH, and piping output to stdout.

var Redis = require('redis-stream'); var client = new Redis(6379, 'localhost', 0); var stream = client.stream('lpush'); stream.pipe(process.stdout); stream.write('mylist'); stream.write('hello'); // Writes: +OK\r\n+OK\r\n
Debug
Known issues
deprecatedPackage is unmaintained and may not support modern Node.js or Redis versions.
fix
Use ioredis or redis (node-redis) for streaming support.
affects: >=0.1.0
gotchaHost parameter is 'localhost' by default; typo in README says 'localhsot'.
fix
Ensure host string is correct: 'localhost'.
affects: 0.1.0
gotchaStreams are raw Redis protocol; output includes inline responses like +OK\r\n.
fix
Use Redis.parse helpers to parse responses.
affects: >=0.1.0
Errors
Common errors & fixes
TypeError: Redis is not a constructor
Using ES6 import syntax instead of require.
fix
Replace 'import Redis from "redis-stream"' with 'var Redis = require("redis-stream")'.
Error: Redis connection refused
Default host 'localhost' not resolved or Redis not running.
fix
Start Redis or provide correct host/port to constructor.
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
12
Amazon
2
Resources
redis-stream — npm install redis-stream · libregistry