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

Method #decodeArrayItems

packages/client/lib/RESP/decoder.ts:762–788  ·  view source on GitHub ↗
(array, filled, typeMapping, chunk)

Source from the content-addressed store, hash-verified

760 }
761
762 #decodeArrayItems(array, filled, typeMapping, chunk) {
763 for (let i = filled; i < array.length; i++) {
764 if (this.#cursor >= chunk.length) {
765 return this.#decodeArrayItems.bind(
766 this,
767 array,
768 i,
769 typeMapping
770 );
771 }
772
773 const item = this.#decodeNestedType(typeMapping, chunk);
774 if (typeof item === 'function') {
775 return this.#continueDecodeArrayItems.bind(
776 this,
777 array,
778 i,
779 item,
780 typeMapping
781 );
782 }
783
784 array[i] = item;
785 }
786
787 return array;
788 }
789
790 #continueDecodeArrayItems(array, filled, itemCb, typeMapping, chunk) {
791 const item = itemCb(chunk);

Callers 4

#decodeSetItemsMethod · 0.95
#decodeMapItemsMethod · 0.95

Calls 1

#decodeNestedTypeMethod · 0.95

Tested by

no test coverage detected