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

Function batchRemove

packages/infra/src/Store/Memory.ts:375–388  ·  view source on GitHub ↗
(items: NonEmptyReadonlyArray<Encoded[IdKey]>)

Source from the content-addressed store, hash-verified

373 )
374
375 const batchRemove = (items: NonEmptyReadonlyArray<Encoded[IdKey]>) =>
376 Ref
377 .get(store)
378 .pipe(
379 Effect
380 .map((m) => {
381 return new Map([...m].filter(([_k]) => !items.includes(_k)))
382 }),
383 Effect
384 .flatMap((_) => Ref.set(store, _))
385 )
386 .pipe(
387 withPermit
388 )
389 const s: Store<IdKey, Encoded> = {
390 seedNamespace: () => Effect.void,
391

Callers

nothing calls this directly

Calls 5

filterMethod · 0.80
pipeMethod · 0.65
getMethod · 0.65
mapMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…