MCPcopy Create free account
hub / github.com/cortexkit/magic-context / parseJsonc

Function parseJsonc

packages/dashboard/src/lib/jsonc.ts:26–28  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

24
25/** Parse JSONC into an object. Throws on malformed JSONC instead of returning a destructive fallback. */
26export function parseJsonc(text: string): Record<string, unknown> {
27 return parseRoot(text);
28}
29
30function stringifyJsonc(root: Record<string, unknown>): string {
31 const rendered = stringify(root, null, 2);

Callers 15

parseConfigContentFunction · 0.90
toggleTaskFunction · 0.90
jsonc.test.tsFile · 0.90
readJsoncFunction · 0.50
readJsoncFunction · 0.50
readConfigForEmbeddingFunction · 0.50
doctor-pi.test.tsFile · 0.50
setup-pi.test.tsFile · 0.50
readJsoncFunction · 0.50
readConfigFunction · 0.50

Calls 1

parseRootFunction · 0.85

Tested by

no test coverage detected