MCPcopy Create free account
hub / github.com/TanStack/db / cachedReferenceHash

Function cachedReferenceHash

packages/db-ivm/src/hashing/hash.ts:199–207  ·  view source on GitHub ↗
(fn: object)

Source from the content-addressed store, hash-verified

197
198let nextRefId = 1
199function cachedReferenceHash(fn: object): number {
200 let valueHash = hashCache.get(fn)
201 if (valueHash === undefined) {
202 valueHash = nextRefId ^ FUNCTIONS
203 nextRefId++
204 hashCache.set(fn, valueHash)
205 }
206 return valueHash
207}
208
209/**
210 * Strings sorted lexicographically.

Callers 2

hashObjectFunction · 0.85
updateHasherFunction · 0.85

Calls 2

getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected