(json: unknown)
| 738 | |
| 739 | /** @internal */ |
| 740 | export const fromJson = (json: unknown): ConfigProvider.ConfigProvider => { |
| 741 | const hiddenDelimiter = "\ufeff" |
| 742 | const indexedEntries = Arr.map( |
| 743 | getIndexedEntries(json as JsonMap).filter(([path]) => |
| 744 | path.every((component) => component._tag === "KeyIndex" || !component.name.includes(hiddenDelimiter)) |
| 745 | ), |
| 746 | ([key, value]): [string, string] => [configPathToString(key).join(hiddenDelimiter), value] |
| 747 | ) |
| 748 | return fromMap(new Map(indexedEntries), { |
| 749 | pathDelim: hiddenDelimiter, |
| 750 | seqDelim: hiddenDelimiter |
| 751 | }) |
| 752 | } |
| 753 | |
| 754 | const configPathToString = (path: ReadonlyArray<KeyComponent>): ReadonlyArray<string> => { |
| 755 | const output: Array<string> = [] |
nothing calls this directly
no test coverage detected