MCPcopy
hub / github.com/redis/node-redis / #decodeMapKeyValue

Method #decodeMapKeyValue

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

Source from the content-addressed store, hash-verified

996 }
997
998 #decodeMapKeyValue(type, typeMapping, chunk) {
999 switch (type) {
1000 // decode simple string map key as string (and not as buffer)
1001 case RESP_TYPES.SIMPLE_STRING:
1002 return this.#decodeSimpleString(String, chunk);
1003
1004 // decode blob string map key as string (and not as buffer)
1005 case RESP_TYPES.BLOB_STRING:
1006 return this.#decodeBlobString(String, chunk);
1007
1008 default:
1009 return this.#decodeNestedTypeValue(type, typeMapping, chunk);
1010 }
1011 }
1012
1013 #continueDecodeMapKey(map, remaining, keyCb, typeMapping, chunk) {
1014 const key = keyCb(chunk);

Callers 1

#decodeMapKeyMethod · 0.95

Calls 3

#decodeSimpleStringMethod · 0.95
#decodeBlobStringMethod · 0.95

Tested by

no test coverage detected