MCPcopy Create free account
hub / github.com/dmno-dev/bumpy / readJsonc

Function readJsonc

packages/bumpy/src/utils/fs.ts:10–13  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

8}
9
10export async function readJsonc<T = Record<string, unknown>>(filePath: string): Promise<T> {
11 const content = await readFile(filePath, 'utf-8');
12 return parseJsonc(content) as T;
13}
14
15export async function writeJson(filePath: string, data: unknown, indent = 2): Promise<void> {
16 await writeFile(filePath, JSON.stringify(data, null, indent) + '\n', 'utf-8');

Callers

nothing calls this directly

Calls 1

parseJsoncFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…