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

Function flatten

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

Source from the content-addressed store, hash-verified

567}
568
569const flatten = (self: ContextImpl<any>): ReadonlyMap<string, any> => {
570 if (self._flat) return self._flat
571 if (!self.overlay) return self._flat = self.base
572 const map = new Map(self.base)
573 applyOverlays(map, self.overlay)
574 return self._flat = map
575}
576
577// Copies without caching a flattened map on `self`.
578const copyMap = (self: ContextImpl<any>): Map<string, any> => {

Callers 1

getFunction · 0.70

Calls 1

applyOverlaysFunction · 0.85

Tested by

no test coverage detected