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

Function trieNodeAt

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

Source from the content-addressed store, hash-verified

986}
987
988function trieNodeAt(root: EnvTrieNode, path: Path): EnvTrieNode | undefined {
989 if (path.length === 0) return root
990
991 // Convert path segments to strings and navigate through the trie
992 let node: EnvTrieNode | undefined = root
993 for (const seg of path) {
994 node = node?.children?.[String(seg)]
995 if (!node) return undefined
996 }
997 return node
998}
999
1000/**
1001 * Creates a `ConfigProvider` by parsing the string contents of a `.env` file.

Callers 1

nodeAtEnvFunction · 0.85

Calls 1

StringInterface · 0.70

Tested by

no test coverage detected