You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-10 11:43:01 +03:00
14 lines
332 B
TypeScript
14 lines
332 B
TypeScript
export function transformArguments(slots: number | Array<number>): Array<string> {
|
|
const args = ['CLUSTER', 'ADDSLOTS'];
|
|
|
|
if (typeof slots === 'number') {
|
|
args.push(slots.toString());
|
|
} else {
|
|
args.push(...slots.map(String));
|
|
}
|
|
|
|
return args;
|
|
}
|
|
|
|
export declare function transformReply(): string;
|