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

Method #decodeSetItems

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

Source from the content-addressed store, hash-verified

825 }
826
827 #decodeSetItems(length, typeMapping, chunk) {
828 return typeMapping[RESP_TYPES.SET] === Set ?
829 this.#decodeSetAsSet(
830 new Set(),
831 length,
832 typeMapping,
833 chunk
834 ) :
835 this.#decodeArrayItems(
836 new Array(length),
837 0,
838 typeMapping,
839 chunk
840 );
841 }
842
843 #decodeSetAsSet(set, remaining, typeMapping, chunk) {
844 // using `remaining` instead of `length` & `set.size` to make it work even if the set contains duplicates

Callers 2

#decodeSetMethod · 0.95

Calls 2

#decodeSetAsSetMethod · 0.95
#decodeArrayItemsMethod · 0.95

Tested by

no test coverage detected