1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00
Files
node-redis/packages/client/lib/commands/MSET.ts

18 lines
444 B
TypeScript

export const FIRST_KEY_INDEX = 1;
export function transformArguments(toSet: Array<[string, string]> | Array<string> | Record<string, string>): Array<string> {
const args = ['MSET'];
if (Array.isArray(toSet)) {
args.push(...toSet.flat());
} else {
for (const key of Object.keys(toSet)) {
args.push(key, toSet[key]);
}
}
return args;
}
export declare function transformReply(): string;