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

Function expand

packages/platform/src/internal/platformConfigProvider.ts:98–107  ·  view source on GitHub ↗
(parsed: Record<string, string>)

Source from the content-addressed store, hash-verified

96
97/** @internal */
98const expand = (parsed: Record<string, string>) => {
99 const newParsed: Record<string, string> = {}
100
101 for (const configKey in parsed) {
102 // resolve escape sequences
103 newParsed[configKey] = interpolate(parsed[configKey], parsed).replace(/\\\$/g, "$")
104 }
105
106 return newParsed
107}
108
109/** @internal */
110const interpolate = (envValue: string, parsed: Record<string, string>) => {

Callers 1

parseDotEnvFunction · 0.70

Calls 1

interpolateFunction · 0.85

Tested by

no test coverage detected