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

Function readJSONFile

tools/setup-packages/src/utils/fs.ts:8–14  ·  view source on GitHub ↗
(filepath: string)

Source from the content-addressed store, hash-verified

6}
7
8export function readJSONFile<T>(filepath: string): Promise<T> {
9 return (
10 readFile(filepath)
11 // oxlint-disable-next-line typescript/no-unsafe-type-assertion
12 .then((content) => parseJsonc(content) as T)
13 );
14}
15
16export function fileExists(filepath: string) {
17 return fs.access(filepath).then(

Callers 1

index.vitest.tsFile · 0.90

Calls 1

readFileFunction · 0.85

Tested by

no test coverage detected