MCPcopy
hub / github.com/formatjs/formatjs / readJsonFile

Function readJsonFile

tools/release-please/npm-workspace-graph.ts:39–41  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

37type PackageWithDependencies = Partial<Record<DependencyField, DependencyMap>>
38
39function readJsonFile(path: string): unknown {
40 return JSON.parse(readFileSync(path, 'utf8'))
41}
42
43function dependencyMap(value: unknown): DependencyMap {
44 if (!value || typeof value !== 'object' || Array.isArray(value)) {

Callers 1

readGraphFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected