MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / readJson

Function readJson

src/commands/migrate.ts:103–112  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

101}
102
103function readJson(filePath: string): Record<string, unknown> | undefined {
104 try {
105 return JSON.parse(fs.readFileSync(filePath, "utf8")) as Record<
106 string,
107 unknown
108 >;
109 } catch {
110 return undefined;
111 }
112}
113
114function isPlainObject(value: unknown): value is Record<string, unknown> {
115 return typeof value === "object" && value !== null && !Array.isArray(value);

Callers 4

readMcpServersFunction · 0.70
applyMigrationFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected