File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,7 @@ var parserHiRedis = new Parser({
65
65
var parser = new Parser ( {
66
66
returnReply : checkReply ,
67
67
returnError : returnError ,
68
- returnFatalError : returnError ,
69
- name : 'javascript'
68
+ returnFatalError : returnError
70
69
} )
71
70
72
71
// BULK STRINGS
Original file line number Diff line number Diff line change 1
1
'use strict'
2
2
3
3
var parsers = {
4
- Javascript : require ( './javascript' )
4
+ javascript : require ( './javascript' )
5
5
}
6
6
7
7
// Hiredis might not be installed
8
8
try {
9
- parsers . Hiredis = require ( './hiredis' )
9
+ parsers . hiredis = require ( './hiredis' )
10
10
} catch ( err ) { /* ignore errors */ }
11
11
12
12
function Parser ( options ) {
@@ -45,9 +45,9 @@ function Parser (options) {
45
45
}
46
46
47
47
if ( options . name === 'javascript' || ! parsers . hiredis || options . stringNumbers ) {
48
- parser = new parsers . Javascript ( innerOptions )
48
+ parser = new parsers . javascript ( innerOptions ) // eslint-disable-line new-cap
49
49
} else {
50
- parser = new parsers . Hiredis ( innerOptions )
50
+ parser = new parsers . hiredis ( innerOptions ) // eslint-disable-line new-cap
51
51
}
52
52
53
53
parser . returnError = options . returnError
Original file line number Diff line number Diff line change @@ -214,6 +214,7 @@ function JavascriptRedisParser (options) {
214
214
if ( options . name === 'hiredis' ) {
215
215
try {
216
216
var Hiredis = require ( '../test/hiredis' )
217
+ console . error ( new TypeError ( 'Using the hiredis parser is discouraged. Please remove the name option.' ) . stack )
217
218
return new Hiredis ( options )
218
219
} catch ( e ) { }
219
220
}
You can’t perform that action at this time.
0 commit comments