1
0
mirror of https://github.com/redis/node-redis.git synced 2025-12-12 21:21:15 +03:00
Files
node-redis/packages/client/lib/commands/DIGEST.ts
Pavel Pashov 2fdb6def45 feat(client): add CAS/CAD, DELEX, DIGEST support (#3123)
* feat: add digest command and tests

* feat: add delex command and tests

* feat: add more conditional options to SET update tests
2025-11-03 13:53:01 +02:00

18 lines
531 B
TypeScript

import { CommandParser } from "../client/parser";
import { Command, RedisArgument, SimpleStringReply } from "../RESP/types";
export default {
IS_READ_ONLY: true,
/**
* Returns the XXH3 hash of a string value.
*
* @param parser - The Redis command parser
* @param key - Key to get the digest of
*/
parseCommand(parser: CommandParser, key: RedisArgument) {
parser.push("DIGEST");
parser.pushKey(key);
},
transformReply: undefined as unknown as () => SimpleStringReply,
} as const satisfies Command;