MCPcopy Create free account
hub / github.com/redis/node-redis / #decodeDoubleExponent

Method #decodeDoubleExponent

packages/client/lib/RESP/decoder.ts:442–456  ·  view source on GitHub ↗
(double, chunk)

Source from the content-addressed store, hash-verified

440 }
441
442 #decodeDoubleExponent(double, chunk) {
443 switch (chunk[this.#cursor]) {
444 case ASCII['+']:
445 return ++this.#cursor === chunk.length ?
446 this.#continueDecodeDoubleExponent.bind(this, false, double, 0) :
447 this.#continueDecodeDoubleExponent(false, double, 0, chunk);
448
449 case ASCII['-']:
450 return ++this.#cursor === chunk.length ?
451 this.#continueDecodeDoubleExponent.bind(this, true, double, 0) :
452 this.#continueDecodeDoubleExponent(true, double, 0, chunk);
453 }
454
455 return this.#continueDecodeDoubleExponent(false, double, 0, chunk);
456 }
457
458 #continueDecodeDoubleExponent(isNegative, double, exponent, chunk) {
459 let cursor = this.#cursor;

Callers 2

#decodeDoubleDecimalMethod · 0.95

Calls 1

Tested by

no test coverage detected