| 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 |