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

Function parseCommand

packages/client/lib/commands/CLIENT_LIST.ts:20–30  ·  view source on GitHub ↗
(parser: CommandParser, filter?: ListFilter)

Source from the content-addressed store, hash-verified

18 NOT_KEYED_COMMAND: true,
19 IS_READ_ONLY: true,
20 parseCommand(parser: CommandParser, filter?: ListFilter) {
21 parser.push('CLIENT', 'LIST');
22 if (filter) {
23 if (filter.TYPE !== undefined) {
24 parser.push('TYPE', filter.TYPE);
25 } else {
26 parser.push('ID');
27 parser.pushVariadic(filter.ID);
28 }
29 }
30 },
31 transformReply(rawReply: VerbatimStringReply): Array<ClientInfoReply> {
32 const split = rawReply.toString().split('\n'),
33 length = split.length - 1,

Callers

nothing calls this directly

Calls 2

pushVariadicMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected