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

Function trieNodeAt

repos/effect/packages/effect/src/ConfigProvider.ts:880–890  ·  view source on GitHub ↗
(root: EnvTrieNode, path: Path)

Source from the content-addressed store, hash-verified

878 * Use to read configuration from `process.env`, which is the default when no
879 * provider is explicitly set, or pass a custom env record for testing.
880 *
881 * **Details**
882 *
883 * Path segments are joined with `_` for direct lookup, and env var names are
884 * also split on `_` to build a trie for child key discovery. This means
885 * `DATABASE_HOST=localhost` is accessible at both path `["DATABASE_HOST"]`
886 * and `["DATABASE", "HOST"]`. If all immediate children of a trie node have
887 * purely numeric names, the node is reported as an `Array`; otherwise as a
888 * `Record`.
889 *
890 * The default environment merges `process.env` and `import.meta.env` (when
891 * available). Override by passing `{ env: { ... } }`.
892 *
893 * Literal empty strings are treated as missing values when loaded as values by

Callers 1

nodeAtEnvFunction · 0.85

Calls 1

StringInterface · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…