MCPcopy Create free account
hub / github.com/AlexErrant/Pentive / stringifyMap

Function stringifyMap

shared/src/utility.ts:67–69  ·  view source on GitHub ↗
(map: Map<unknown, unknown>)

Source from the content-addressed store, hash-verified

65
66// highTODO property test
67export function stringifyMap(map: Map<unknown, unknown>) {
68 return JSON.stringify(Object.fromEntries(map))
69}
70
71export function parseMap<T extends string, U>(rawMap: string) {
72 const parsed = JSON.parse(rawMap) as Record<T, U>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected