You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
improve decoder coverage + fix some bugs
This commit is contained in:
@@ -598,7 +598,7 @@ export class Decoder {
|
||||
|
||||
private _continueDecodeVerbatimStringLength(lengthCb, type, chunk) {
|
||||
const length = lengthCb(chunk);
|
||||
return typeof length === 'function'?
|
||||
return typeof length === 'function' ?
|
||||
this._continueDecodeVerbatimStringLength.bind(this, length, type) :
|
||||
this._decodeVerbatimStringWithLength(length, type, chunk);
|
||||
}
|
||||
@@ -616,11 +616,10 @@ export class Decoder {
|
||||
}
|
||||
|
||||
private _decodeVerbatimStringFormat(stringLength, chunk) {
|
||||
return this._continueDecodeVerbatimStringFormat(
|
||||
stringLength,
|
||||
this._decodeStringWithLength.bind(this, 3, 1, String),
|
||||
chunk
|
||||
);
|
||||
const formatCb = this._decodeStringWithLength.bind(this, 3, 1, String);
|
||||
return this._cursor >= chunk.length ?
|
||||
this._continueDecodeVerbatimStringFormat.bind(this, stringLength, formatCb) :
|
||||
this._continueDecodeVerbatimStringFormat(stringLength, formatCb, chunk);
|
||||
}
|
||||
|
||||
private _continueDecodeVerbatimStringFormat(stringLength, formatCb, chunk) {
|
||||
|
Reference in New Issue
Block a user