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

Function hash

packages/db-ivm/src/hashing/hash.ts:51–55  ·  view source on GitHub ↗
(input: any)

Source from the content-addressed store, hash-verified

49const hashCache = new WeakMap<object, number>()
50
51export function hash(input: any): number {
52 const hasher = new MurmurHashStream()
53 updateHasher(hasher, input)
54 return hasher.digest()
55}
56
57function hashObject(input: object): number {
58 const cachedHash = hashCache.get(input)

Callers 8

addValueMethod · 0.85
addValueMethod · 0.85
#consolidateUnkeyedMethod · 0.85
runMethod · 0.85
utils.test.tsFile · 0.85
testDistinctFunction · 0.85

Calls 2

digestMethod · 0.95
updateHasherFunction · 0.85

Tested by 1

testDistinctFunction · 0.68