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

Function htmlEscape

nezha/nezha.ts:117–125  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

115 } catch (e) {
116 console.error("Failed to save nezha config:", e);
117 }
118}
119
120function formatBytes(bytes: number): string {
121 if (bytes === 0) return "0 B";
122 const k = 1024;
123 const sizes = ["B", "KB", "MB", "GB", "TB"];
124 const i = Math.floor(Math.log(bytes) / Math.log(k));
125 return (bytes / Math.pow(k, i)).toFixed(2) + " " + sizes[i];
126}
127
128function formatSpeed(bytes: number): string {

Callers 2

formatServerInfoFunction · 0.70
nezhaFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected