MCPcopy
hub / github.com/ionic-team/capacitor / readJSON

Function readJSON

scripts/lib/fs.mjs:6–6  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

4export const mkdir = util.promisify(fs.mkdir);
5export const readFile = util.promisify(fs.readFile);
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 7

runPlatformHookFunction · 0.85
getCapacitorPackageFunction · 0.85
resolvePluginFunction · 0.85
readConfigFunction · 0.85
loadCLIConfigFunction · 0.85
printPackageVersionFunction · 0.85

Calls 2

readFileFunction · 0.85
parseMethod · 0.45

Tested by

no test coverage detected