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

Function fromUnknown

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

Source from the content-addressed store, hash-verified

795 * @since 4.0.0
796 */
797export function fromUnknown(root: unknown, options?: {
798 readonly preserveEmptyStrings?: boolean | undefined
799}): ConfigProvider {
800 const preserveEmptyStrings = options?.preserveEmptyStrings === true
801 return make((path) => Effect.succeed(nodeAtJson(root, path, preserveEmptyStrings)))
802}
803
804function nodeAtJson(root: unknown, path: Path, preserveEmptyStrings: boolean): Node | undefined {
805 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