MCPcopy Create free account
hub / github.com/freecodexyz/free-code / getHasher

Function getHasher

src/utils/cch.ts:9–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7let hasherPromise: ReturnType<typeof xxhash> | null = null
8
9function getHasher() {
10 if (!hasherPromise) {
11 hasherPromise = xxhash()
12 }
13 return hasherPromise
14}
15
16export async function computeCch(body: string): Promise<string> {
17 const hasher = await getHasher()

Callers 1

computeCchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected