MCPcopy Create free account
hub / github.com/dyoshikawa/rulesync / writeJsonFile

Function writeJsonFile

src/utils/file.ts:110–117  ·  view source on GitHub ↗
(
  filepath: string,
  data: unknown,
  indent: number = 2,
)

Source from the content-addressed store, hash-verified

108 * Writes an object to a JSON file with proper formatting
109 */
110export async function writeJsonFile(
111 filepath: string,
112 data: unknown,
113 indent: number = 2,
114): Promise<void> {
115 const content = JSON.stringify(data, null, indent);
116 await writeFileContent(filepath, content);
117}
118
119/**
120 * Checks if a directory exists and is actually a directory

Callers 1

file.test.tsFile · 0.85

Calls 1

writeFileContentFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…