1
0
mirror of https://github.com/redis/node-redis.git synced 2025-09-11 18:50:46 +03:00
This commit is contained in:
leibale
2021-05-12 14:27:02 -04:00
parent 4f85030e42
commit c9707c9d0d
200 changed files with 7049 additions and 14525 deletions

14
lib/commands/HGETALL.ts Normal file
View File

@@ -0,0 +1,14 @@
export const FIRST_KEY_INDEX = 1;
export function transformArguments(key: string): Array<string> {
return ['HGETALL', key];
}
export function transformReply(reply: Array<string>): Record<string, string> {
const obj = Object.create(null);
for (let i = 0; i < reply.length; i += 2) {
obj[reply[i]] = reply[i + 1];
}
return obj;
}