MCPcopy Create free account
hub / github.com/arctic-cli/interface / readJson

Function readJson

packages/arctic/src/cli/recent-sessions.ts:96–103  ·  view source on GitHub ↗
(target: string)

Source from the content-addressed store, hash-verified

94}
95
96function readJson<T>(target: string): T | undefined {
97 try {
98 const raw = fs.readFileSync(target, "utf8")
99 return JSON.parse(raw) as T
100 } catch {
101 return undefined
102 }
103}
104
105function pathsOverlap(a: string, b: string): boolean {
106 return isWithin(a, b) || isWithin(b, a)

Callers 2

loadRecentSessionsFunction · 0.85
resolveProjectIDsForCwdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected