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

Function functionArgumentsPrefix

packages/client/lib/commander.ts:118–129  ·  view source on GitHub ↗
(name: string, fn: RedisFunction)

Source from the content-addressed store, hash-verified

116}
117
118export function functionArgumentsPrefix(name: string, fn: RedisFunction) {
119 const prefix: Array<RedisArgument> = [
120 fn.IS_READ_ONLY ? 'FCALL_RO' : 'FCALL',
121 name
122 ];
123
124 if (fn.NUMBER_OF_KEYS !== undefined) {
125 prefix.push(fn.NUMBER_OF_KEYS.toString());
126 }
127
128 return prefix;
129}
130
131export function scriptArgumentsPrefix(script: RedisScript) {
132 const prefix: Array<string | Buffer> = [

Callers 7

createFunctionCommandFunction · 0.90

Calls 2

toStringMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected