Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Streaming Redis response parser
JavaScript
tag: 0.1.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
README.md
package.json
parser.js

README.md

redisparse

Streaming Redis response parser.

Does not do any data buffering or bail out on incomplete input data. Every chunk is processed separately.

API is mostly compatible with mranney/node_redis with added support for partial replies.

Installation

npm install redisparse

Usage

var Parser = require('redisparse').Parser
var parser = new Parser
parser.execute(data)

new Parser([options])

options.return_buffers - Return buffers for replies.

execute(buffer)

Input binary redis response data to the parser.

Events

reply - Result for a command. Type depends on command. Can be string, buffer, integer, array or null.

reply partial - Same as reply but more replies are coming.

reply error - Redis command error.

error - Parsing error. Invalid data.

Something went wrong with that request. Please try again.