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

Function fromUnknown

packages/effect/src/ConfigProvider.ts:779–784  ·  view source on GitHub ↗
(root: unknown, options?: {
  readonly preserveEmptyStrings?: boolean | undefined
})

Source from the content-addressed store, hash-verified

777 * @since 4.0.0
778 */
779export function fromUnknown(root: unknown, options?: {
780 readonly preserveEmptyStrings?: boolean | undefined
781}): ConfigProvider {
782 const preserveEmptyStrings = options?.preserveEmptyStrings === true
783 return make((path) => Effect.succeed(nodeAtJson(root, path, preserveEmptyStrings)))
784}
785
786function nodeAtJson(root: unknown, path: Path, preserveEmptyStrings: boolean): Node | undefined {
787 let cur: unknown = root

Callers

nothing calls this directly

Calls 3

nodeAtJsonFunction · 0.85
makeFunction · 0.70
succeedMethod · 0.45

Tested by

no test coverage detected