MCPcopy Create free account
hub / github.com/Effect-TS/effect / hash

Function hash

packages/effect/src/internal/stm/tMap.ts:57–60  ·  view source on GitHub ↗
(key: K)

Source from the content-addressed store, hash-verified

55
56/** @internal */
57const hash = <K>(key: K): number => {
58 const h = Hash.hash(key)
59 return h ^ (h >>> 16)
60}
61
62/** @internal */
63const indexOf = <K>(k: K, capacity: number): number => hash(k) & (capacity - 1)

Callers 1

indexOfFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected