You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-10 11:43:01 +03:00
34 lines
685 B
TypeScript
34 lines
685 B
TypeScript
export const FIRST_KEY_INDEX = 1;
|
|
|
|
export const IS_READ_ONLY = true;
|
|
|
|
interface XPendingRangeOptions {
|
|
IDLE?: number;
|
|
consumer?: string;
|
|
}
|
|
|
|
export function transformArguments(
|
|
key: string,
|
|
group: string,
|
|
start: string,
|
|
end: string,
|
|
count: number,
|
|
options?: XPendingRangeOptions
|
|
): Array<string> {
|
|
const args = ['XPENDING', key, group];
|
|
|
|
if (options?.IDLE) {
|
|
args.push('IDLE', options.IDLE.toString());
|
|
}
|
|
|
|
args.push(start, end, count.toString());
|
|
|
|
if (options?.consumer) {
|
|
args.push(options.consumer);
|
|
}
|
|
|
|
return args;
|
|
}
|
|
|
|
export { transformReplyStreamMessages as transformReply } from './generic-transformers';
|