MCPcopy Index your code
hub / github.com/Effect-TS/effect / fromJson

Function fromJson

packages/effect/src/internal/configProvider.ts:719–729  ·  view source on GitHub ↗
(json: unknown)

Source from the content-addressed store, hash-verified

717
718/** @internal */
719export const fromJson = (json: unknown): ConfigProvider.ConfigProvider => {
720 const hiddenDelimiter = "\ufeff"
721 const indexedEntries = Arr.map(
722 getIndexedEntries(json as JsonMap),
723 ([key, value]): [string, string] => [configPathToString(key).join(hiddenDelimiter), value]
724 )
725 return fromMap(new Map(indexedEntries), {
726 pathDelim: hiddenDelimiter,
727 seqDelim: hiddenDelimiter
728 })
729}
730
731const configPathToString = (path: ReadonlyArray<KeyComponent>): ReadonlyArray<string> => {
732 const output: Array<string> = []

Callers

nothing calls this directly

Calls 5

getIndexedEntriesFunction · 0.85
configPathToStringFunction · 0.85
fromMapFunction · 0.85
mapMethod · 0.65
joinMethod · 0.65

Tested by

no test coverage detected