You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-13 10:02:24 +03:00
16 lines
398 B
TypeScript
16 lines
398 B
TypeScript
import { transformReplyString } from './generic-transformers';
|
|
|
|
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 const transformReply = transformReplyString;
|