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

Function loadConfig

speedlink/speedlink.ts:242–251  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

240const SPEEDTEST_PATH = path.join(ASSETS_DIR, "speedtest");
241const SPEEDTEST_VERSION = "1.2.0";
242
243// --- Load/Save configuration ---
244function loadConfig(): { timeout?: number } {
245 try {
246 if (fs.existsSync(CONFIG_PATH)) {
247 return JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8'));
248 }
249 } catch (e) {
250 console.error("Failed to load config:", e);
251 }
252 return {};
253}
254

Callers 2

speedlink.tsFile · 0.70
speedtestFunction · 0.70

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected