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

Function htmlEscape

fadian/fadian.ts:33–46  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

31// 缓存配置数据
32let configCache: { [key: string]: string[] } = {};
33let lastUpdateCheck = 0;
34const UPDATE_INTERVAL = 5 * 60 * 1000; // 5分钟检查一次
35
36const filterInput = (s: string): string =>
37 (s || "")
38 .split("")
39 // .filter((c) => /[\w\- ]/u.test(c))
40 .filter((c) => c.length)
41 .join("");
42
43// 从本地缓存读取JSON数组
44function readJsonArray(file: string): string[] {
45 try {
46 const raw = fs.readFileSync(file, "utf-8");
47 const data = JSON.parse(raw);
48 return Array.isArray(data) ? data : [];
49 } catch {

Callers 2

FadianPluginClass · 0.70
clearCacheMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected