MCPcopy Index your code
hub / github.com/bytebase/bytebase / loadJsonFile

Function loadJsonFile

frontend/i18n.ts:125–133  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

123}
124
125async function loadJsonFile(filePath: string): Promise<JsonObject> {
126 try {
127 const data = await fs.readFile(filePath, "utf8");
128 return JSON.parse(data);
129 } catch (error) {
130 console.error(`Error reading file ${filePath}:`, error);
131 return {};
132 }
133}
134
135async function saveJsonFile(filePath: string, data: any): Promise<void> {
136 try {

Callers 1

updateLocalizationFilesFunction · 0.85

Calls 1

readFileMethod · 0.80

Tested by

no test coverage detected