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

Method #continueDecodeDoubleExponent

packages/client/lib/RESP/decoder.ts:458–472  ·  view source on GitHub ↗
(isNegative, double, exponent, chunk)

Source from the content-addressed store, hash-verified

456 }
457
458 #continueDecodeDoubleExponent(isNegative, double, exponent, chunk) {
459 let cursor = this.#cursor;
460 do {
461 const byte = chunk[cursor];
462 if (byte === ASCII['\r']) {
463 this.#cursor = cursor + 2; // skip \r\n
464 return double * 10 ** (isNegative ? -exponent : exponent);
465 }
466
467 exponent = exponent * 10 + byte - ASCII['0'];
468 } while (++cursor < chunk.length);
469
470 this.#cursor = cursor;
471 return this.#continueDecodeDoubleExponent.bind(this, isNegative, double, exponent);
472 }
473
474 #findCRLF(chunk, cursor) {
475 while (chunk[cursor] !== ASCII['\r']) {

Callers 1

#decodeDoubleExponentMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected