1
0
mirror of https://github.com/redis/node-redis.git synced 2025-12-12 21:21:15 +03:00

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
This commit is contained in:
Pavel Pashov
2025-11-03 13:53:01 +02:00
committed by GitHub
parent 5a0a06df69
commit 2fdb6def45
7 changed files with 244 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
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;