MCPcopy
hub / github.com/redis/node-redis / getXxh3

Function getXxh3

packages/client/lib/utils/digest.ts:7–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5let xxh3Cache: Xxh3Module | null = null;
6
7async function getXxh3(): Promise<Xxh3Module> {
8 if (!xxh3Cache) {
9 try {
10 const module = await import('@node-rs/xxhash');
11 xxh3Cache = module.xxh3;
12 } catch {
13 throw new Error(
14 'The "digest" function requires the "@node-rs/xxhash" package, but it was not found.'
15 );
16 }
17 }
18 return xxh3Cache;
19}
20
21/**
22 * Computes a deterministic 64-bit XXH3 digest of the input.

Callers 1

digestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected