You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-11 22:42:42 +03:00
17 lines
451 B
TypeScript
17 lines
451 B
TypeScript
import { transformReplyStringArray } from './generic-transformers';
|
|
|
|
export const FIRST_KEY_INDEX = 1;
|
|
|
|
export function transformArguments(key: string, count?: number): Array<string> {
|
|
const args = ['SRANDMEMBER', key];
|
|
|
|
if (typeof count === 'number') {
|
|
args.push(count.toString());
|
|
}
|
|
|
|
return args;
|
|
}
|
|
|
|
// TODO: without `count` it'll return "bulk string" and not "array"
|
|
export const transformReply = transformReplyStringArray;
|