You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
fixes after code review
This commit is contained in:
@@ -5,16 +5,16 @@ export const FIRST_KEY_INDEX = 1;
|
||||
|
||||
export interface KeyPathValue {
|
||||
key: RedisCommandArgument;
|
||||
path: string;
|
||||
path: RedisCommandArgument;
|
||||
value: RedisJSON;
|
||||
}
|
||||
|
||||
export function transformArguments(keyPathValues: Array<KeyPathValue>): RedisCommandArguments {
|
||||
const args: RedisCommandArguments = ['JSON.MSET'];
|
||||
|
||||
keyPathValues.forEach(({ key, path, value }) => {
|
||||
for (const { key, path, value } of keyPathValues) {
|
||||
args.push(key, path, transformRedisJsonArgument(value));
|
||||
});
|
||||
}
|
||||
|
||||
return args;
|
||||
}
|
||||
|
Reference in New Issue
Block a user