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

Function parseCommand

packages/client/lib/commands/MEMORY_USAGE.ts:10–17  ·  view source on GitHub ↗
(parser: CommandParser, key: RedisArgument, options?: MemoryUsageOptions)

Source from the content-addressed store, hash-verified

8export default {
9 IS_READ_ONLY: true,
10 parseCommand(parser: CommandParser, key: RedisArgument, options?: MemoryUsageOptions) {
11 parser.push('MEMORY', 'USAGE');
12 parser.pushKey(key);
13
14 if (options?.SAMPLES) {
15 parser.push('SAMPLES', options.SAMPLES.toString());
16 }
17 },
18 transformReply: undefined as unknown as () => NumberReply | NullReply
19} as const satisfies Command;

Callers

nothing calls this directly

Calls 3

pushKeyMethod · 0.80
toStringMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected