You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-10 11:43:01 +03:00
20 lines
473 B
TypeScript
20 lines
473 B
TypeScript
import { transformReplyString } from './generic-transformers';
|
|
|
|
export const FIRST_KEY_INDEX = 2;
|
|
|
|
interface XGroupCreateOptions {
|
|
MKSTREAM?: true;
|
|
}
|
|
|
|
export function transformArguments(key: string, group: string, id: string, options?: XGroupCreateOptions): Array<string> {
|
|
const args = ['XGROUP', 'CREATE', key, group, id];
|
|
|
|
if (options?.MKSTREAM) {
|
|
args.push('MKSTREAM');
|
|
}
|
|
|
|
return args;
|
|
}
|
|
|
|
export const transformReply = transformReplyString;
|