You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-11 22:42:42 +03:00
22 lines
462 B
TypeScript
22 lines
462 B
TypeScript
export const FIRST_KEY_INDEX = 0;
|
|
|
|
export function transformArguments(keys: string | Array<string>, timeout: number): Array<string> {
|
|
const args = ['BLPOP'];
|
|
|
|
if (typeof keys === 'string') {
|
|
args.push(keys);
|
|
} else {
|
|
args.push(...keys);
|
|
}
|
|
|
|
args.push(timeout.toString());
|
|
|
|
return args;
|
|
}
|
|
|
|
type BLPOPReply = [list: string, value: string];
|
|
|
|
export function transformReply(reply: BLPOPReply): BLPOPReply {
|
|
return reply;
|
|
}
|