MCPcopy Create free account
hub / github.com/effect-app/libs / getFromBucket

Function getFromBucket

repos/effect/packages/effect/src/MutableHashMap.ts:368–381  ·  view source on GitHub ↗
(
  self: MutableHashMap<K, V>,
  bucket: NonEmptyArray<K>,
  key: K
)

Source from the content-addressed store, hash-verified

366 * Checks whether the MutableHashMap contains the specified key.
367 *
368 * **When to use**
369 *
370 * Use to test whether a key is present in a `MutableHashMap` without reading
371 * its value.
372 *
373 * **Example** (Checking for a key)
374 *
375 * ```ts import.meta.vitest
376 * import { MutableHashMap } from "effect"
377 *
378 * const map = MutableHashMap.make(["key1", 42], ["key2", 100])
379 *
380 * MutableHashMap.has(map, "key1") // => true
381 * MutableHashMap.has(map, "key3") // => false
382 *
383 * // Pipe-able version
384 * MutableHashMap.has("key1")(map) // => true

Callers 1

MutableHashMap.tsFile · 0.85

Calls 3

someMethod · 0.80
setMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…