MCPcopy Index your code
hub / github.com/code-pushup/cli / readJsonFile

Function readJsonFile

packages/utils/src/lib/file-system.ts:11–14  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

9}
10
11export async function readJsonFile<T = unknown>(filePath: string): Promise<T> {
12 const text = await readTextFile(filePath);
13 return JSON.parse(text) as T;
14}
15
16export async function fileExists(filePath: string): Promise<boolean> {
17 try {

Callers 15

mergeDiffsFunction · 0.90
compareReportFilesFunction · 0.90
executeRunnerConfigFunction · 0.90
readPackageJsonFunction · 0.90
runPrintConfigFunction · 0.90

Calls 1

readTextFileFunction · 0.85

Tested by

no test coverage detected