MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / loadConfig

Function loadConfig

nezha/nezha.ts:94–105  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92 configFile = path.join(configDir, "config.json");
93 }
94 return configFile;
95}
96
97function loadConfig(): NeZhaConfig | null {
98 if (configCache) return configCache;
99 try {
100 const file = getConfigPath();
101 if (fs.existsSync(file)) {
102 const content = fs.readFileSync(file, "utf-8");
103 configCache = JSON.parse(content);
104 return configCache;
105 }
106 } catch {}
107 return null;
108}

Callers 1

nezhaFunction · 0.70

Calls 1

getConfigPathFunction · 0.85

Tested by

no test coverage detected