You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A high performance redis parser solution built for [node_redis](https://github.com/NodeRedis/node_redis) and [ioredis](https://github.com/ioredis/luin).
6
8
9
+
Generally all [RESP](http://redis.io/topics/protocol) data will be properly parsed by the parser.
10
+
7
11
## Install
8
12
9
13
Install with [NPM](https://npmjs.org/):
@@ -20,12 +24,12 @@ new Parser(options);
20
24
21
25
### Possible options
22
26
23
-
`returnReply`: *function*; mandatory
24
-
`returnError`: *function*; mandatory
25
-
`returnFatalError`: *function*; optional, defaults to the returnError function
26
-
`returnBuffers`: *boolean*; optional, defaults to false
27
-
`name`: *javascript|hiredis*; optional, defaults to hiredis and falls back to the js parser if not available
28
-
`context`: *A class instance that the return functions get bound to*; optional
27
+
*`returnReply`: *function*; mandatory
28
+
*`returnError`: *function*; mandatory
29
+
*`returnFatalError`: *function*; optional, defaults to the returnError function
30
+
*`returnBuffers`: *boolean*; optional, defaults to false
31
+
*`name`: *javascript|hiredis*; optional, defaults to hiredis and falls back to the js parser if not available
32
+
*`context`: *A class instance that the return functions get bound to*; optional
29
33
30
34
### Example
31
35
@@ -50,7 +54,6 @@ var parser = new Parser({
50
54
Library.prototype.streamHandler=function () {
51
55
this.stream.on('data', function (buffer) {
52
56
// Here the data (e.g. `new Buffer('$5\r\nHello\r\n'`)) is passed to the parser and the result is passed to either function depending on the provided data.
53
-
// All [RESP](http://redis.io/topics/protocol) data will be properly parsed by the parser.
0 commit comments