MCPcopy Index your code
hub / github.com/ionic-team/capacitor / writeJSON

Function writeJSON

scripts/lib/fs.mjs:8–9  ·  view source on GitHub ↗
(p, contents, space = 2)

Source from the content-addressed store, hash-verified

6export const readJSON = async (p) => JSON.parse(await readFile(p));
7export const writeFile = util.promisify(fs.writeFile);
8export const writeJSON = async (p, contents, space = 2) =>
9 writeFile(p, JSON.stringify(contents, undefined, space) + '\n');

Callers 5

writeConfigFunction · 0.85
writeConfigFunction · 0.85
writePluginsJsonFunction · 0.85
copyCapacitorConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected