MCPcopy
hub / github.com/redis/node-redis / parseCommand

Function parseCommand

packages/client/lib/commands/SINTERCARD.ts:16–25  ·  view source on GitHub ↗
(parser: CommandParser, keys: RedisVariadicArgument, options?: SInterCardOptions | number)

Source from the content-addressed store, hash-verified

14export default {
15 IS_READ_ONLY: true,
16 parseCommand(parser: CommandParser, keys: RedisVariadicArgument, options?: SInterCardOptions | number) {
17 parser.push('SINTERCARD');
18 parser.pushKeysLength(keys);
19
20 if (typeof options === 'number') { // backwards compatibility
21 parser.push('LIMIT', options.toString());
22 } else if (options?.LIMIT !== undefined) {
23 parser.push('LIMIT', options.LIMIT.toString());
24 }
25 },
26 transformReply: undefined as unknown as () => NumberReply
27} as const satisfies Command;

Callers

nothing calls this directly

Calls 3

pushKeysLengthMethod · 0.80
toStringMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected