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

Function copyMap

packages/effect/src/Context.ts:578–582  ·  view source on GitHub ↗
(self: ContextImpl<any>)

Source from the content-addressed store, hash-verified

576
577// Copies without caching a flattened map on `self`.
578const copyMap = (self: ContextImpl<any>): Map<string, any> => {
579 const map = new Map(self._flat ?? self.base)
580 if (!self._flat) applyOverlays(map, self.overlay)
581 return map
582}
583
584const withFlat = <B>(self: Context<any>, f: (map: Map<string, any>) => void): Context<B> => {
585 const map = copyMap(self as ContextImpl<any>)

Callers 3

withFlatFunction · 0.85
addUnsafeFunction · 0.85
Context.tsFile · 0.85

Calls 1

applyOverlaysFunction · 0.85

Tested by

no test coverage detected