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

Function hashBucketsHas

packages/effect/src/Array.ts:3106–3117  ·  view source on GitHub ↗
(buckets: HashBuckets, value: unknown)

Source from the content-addressed store, hash-verified

3104}
3105
3106const hashBucketsHas = (buckets: HashBuckets, value: unknown): boolean => {
3107 const bucket = buckets.get(Hash.hash(value))
3108 if (bucket === undefined) {
3109 return false
3110 }
3111 for (const candidate of bucket) {
3112 if (Equal.equals(candidate, value)) {
3113 return true
3114 }
3115 }
3116 return false
3117}
3118
3119/**
3120 * Computes the union of two arrays using a custom equivalence, removing

Callers 1

Array.tsFile · 0.85

Calls 2

equalsMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected