MCPcopy Index your code
hub / github.com/redis/node-redis / #decodeArray

Method #decodeArray

packages/client/lib/RESP/decoder.ts:728–741  ·  view source on GitHub ↗
(typeMapping, chunk)

Source from the content-addressed store, hash-verified

726 }
727
728 #decodeArray(typeMapping, chunk) {
729 // RESP 2 null
730 // https://github.com/redis/redis-specifications/blob/master/protocol/RESP2.md#resp-arrays
731 if (chunk[this.#cursor] === ASCII['-']) {
732 this.#cursor += 4; // skip -1\r\n
733 return null;
734 }
735
736 return this.#decodeArrayWithLength(
737 this.#decodeUnsingedNumber(0, chunk),
738 typeMapping,
739 chunk
740 );
741 }
742
743 #decodeArrayWithLength(length, typeMapping, chunk) {
744 return typeof length === 'function' ?

Callers 2

#decodeTypeValueMethod · 0.95

Calls 2

#decodeUnsingedNumberMethod · 0.95

Tested by

no test coverage detected