Wrapper for reply processing code in hiredis
npm install cjh-hiredis
npm install hiredis
`
[npm]: https://npmjs.org/
Usage
hiredis-node works out of the box with Matt Ranney's [node_redis][node_redis].
The latter has an optional dependency on hiredis-node, so maybe you're
already using it without knowing.
Alternatively, you can use it directly:
`javascript
var hiredis = require("hiredis"),
reader = new hiredis.Reader();
// Data comes in
reader.feed("$5\r\nhello\r\n");
// Reply comes out
reader.get() // => "hello"
`
Instead of returning strings for bulk payloads, it can also return
buffers:
`javascript
var hiredis = require("hiredis"),
reader = new hiredis.Reader({ return_buffers: true });
// Data comes in
reader.feed("$5\r\nhello\r\n");
// Reply comes out
reader.get() // =>
``