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

Function parseCommand

packages/client/lib/commands/EXPIREAT.ts:6–18  ·  view source on GitHub ↗
(
    parser: CommandParser,
    key: RedisArgument,
    timestamp: number | Date,
    mode?: 'NX' | 'XX' | 'GT' | 'LT'
  )

Source from the content-addressed store, hash-verified

4
5export default {
6 parseCommand(
7 parser: CommandParser,
8 key: RedisArgument,
9 timestamp: number | Date,
10 mode?: 'NX' | 'XX' | 'GT' | 'LT'
11 ) {
12 parser.push('EXPIREAT');
13 parser.pushKey(key);
14 parser.push(transformEXAT(timestamp));
15 if (mode) {
16 parser.push(mode);
17 }
18 },
19 transformReply: undefined as unknown as () => NumberReply
20} as const satisfies Command;

Callers

nothing calls this directly

Calls 3

transformEXATFunction · 0.90
pushKeyMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected