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

Function trieNodeAt

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

Source from the content-addressed store, hash-verified

1021}
1022
1023function trieNodeAt(root: EnvTrieNode, path: Path): EnvTrieNode | undefined {
1024 if (path.length === 0) return root
1025
1026 // Convert path segments to strings and navigate through the trie
1027 let node: EnvTrieNode | undefined = root
1028 for (const seg of path) {
1029 node = node?.children?.[String(seg)]
1030 if (!node) return undefined
1031 }
1032 return node
1033}
1034
1035/**
1036 * Creates a `ConfigProvider` by parsing the string contents of a `.env` file.

Callers 1

nodeAtEnvFunction · 0.85

Calls 1

StringFunction · 0.70

Tested by

no test coverage detected