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

Function getRefKey

packages/effect/src/MutableHashMap.ts:473–483  ·  view source on GitHub ↗
(
  bucket: NonEmptyArray<K>,
  key: K
)

Source from the content-addressed store, hash-verified

471})
472
473const getRefKey = <K>(
474 bucket: NonEmptyArray<K>,
475 key: K
476) => {
477 for (let i = 0, len = bucket.length; i < len; i++) {
478 if (Equal.equals(key, bucket[i])) {
479 referentialKeysCache.set(key, bucket[i])
480 return bucket[i]
481 }
482 }
483}
484
485/**
486 * Updates the value of the specified key within the MutableHashMap if it exists.

Callers 1

MutableHashMap.tsFile · 0.85

Calls 2

equalsMethod · 0.80
setMethod · 0.65

Tested by

no test coverage detected