You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
21 lines
444 B
TypeScript
21 lines
444 B
TypeScript
import { transformReplyNumber } from './generic-transformers';
|
|
|
|
export const FIRST_KEY_INDEX = 1;
|
|
|
|
export function transformArguments(key: string, element: string | Array<string>): Array<string> {
|
|
const args = [
|
|
'RPUSHX',
|
|
key
|
|
];
|
|
|
|
if (typeof element === 'string') {
|
|
args.push(element);
|
|
} else {
|
|
args.push(...element);
|
|
}
|
|
|
|
return args;
|
|
}
|
|
|
|
export const transformReply = transformReplyNumber;
|