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

Function htmlEscape

banana/banana.ts:42–53  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

40const configPath = path.join(dataDir, "config.json");
41let dbPromise: Promise<Low<BananaConfig>> | null = null;
42
43const formatBytes = (bytes: number): string => {
44 if (bytes >= 1024 * 1024) {
45 const mb = bytes / (1024 * 1024);
46 return `${mb.toFixed(mb >= 10 ? 0 : 1).replace(/\.0$/, "")}MB`;
47 }
48 if (bytes >= 1024) {
49 const kb = bytes / 1024;
50 return `${kb.toFixed(kb >= 10 ? 0 : 1).replace(/\.0$/, "")}KB`;
51 }
52 return `${bytes}B`;
53};
54
55function estimateMediaSizeBytes(message: Api.Message): number {
56 const doc = (message as any).document;

Callers 1

handleImageEditFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected