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
447 B
TypeScript
21 lines
447 B
TypeScript
import { transformReplyNumber } from './generic-transformers';
|
|
|
|
export const FIRST_KEY_INDEX = 1;
|
|
|
|
export function transformArguments(key: string, elements: string | Array<string>): Array<string> {
|
|
const args = [
|
|
'LPUSH',
|
|
key
|
|
];
|
|
|
|
if (typeof elements === 'string') {
|
|
args.push(elements);
|
|
} else {
|
|
args.push(...elements);
|
|
}
|
|
|
|
return args;
|
|
}
|
|
|
|
export const transformReply = transformReplyNumber;
|