(value: RedisArgument)
| 29 | * @throws If the `@node-rs/xxhash` package is not found |
| 30 | */ |
| 31 | export async function digest(value: RedisArgument): Promise<string> { |
| 32 | const xxh3 = await getXxh3(); |
| 33 | const data = typeof value === 'string' ? value : new Uint8Array(value); |
| 34 | const hash = xxh3.xxh64(data); |
| 35 | return hash.toString(16).padStart(16, '0'); |
| 36 | } |
| 37 |
no test coverage detected