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

Function fromEnv

packages/effect/src/ConfigProvider.ts:925–936  ·  view source on GitHub ↗
(options?: {
  readonly env?: Record<string, string> | undefined
  readonly preserveEmptyStrings?: boolean | undefined
})

Source from the content-addressed store, hash-verified

923 * @since 2.0.0
924 */
925export function fromEnv(options?: {
926 readonly env?: Record<string, string> | undefined
927 readonly preserveEmptyStrings?: boolean | undefined
928}): ConfigProvider {
929 const env: Record<string, string | undefined> = options?.env ?? {
930 ...(globalThis as {
931 readonly process?: { readonly env?: Record<string, string | undefined> }
932 }).process?.env,
933 ...(import.meta as any)?.env
934 }
935 return fromEnvRecord(env, { preserveEmptyStrings: options?.preserveEmptyStrings })
936}
937
938type EnvTrieNode = {
939 children?: Record<string, EnvTrieNode>

Callers 1

ConfigProvider.tsFile · 0.85

Calls 1

fromEnvRecordFunction · 0.85

Tested by

no test coverage detected