MCPcopy Create free account
hub / github.com/SBoudrias/Inquirer.js / writeJSONFile

Function writeJSONFile

tools/setup-packages/src/bin.ts:44–46  ·  view source on GitHub ↗
(filepath: string, content: unknown)

Source from the content-addressed store, hash-verified

42}
43
44async function writeJSONFile(filepath: string, content: unknown) {
45 await writeFile(filepath, JSON.stringify(content, null, 2) + '\n');
46}
47
48const rootPkg = await readJSONFile<PackageJson>(path.join(process.cwd(), 'package.json'));
49const rootNodeRange = rootPkg.engines?.['node'];

Callers 1

bin.tsFile · 0.85

Calls 1

writeFileFunction · 0.85

Tested by

no test coverage detected