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

Method censorUrl

outdated/gemini/gemini.ts:138–141  ·  view source on GitHub ↗
(url: string | null)

Source from the content-addressed store, hash-verified

136
137class Utils {
138 static censorUrl(url: string | null): string {
139 if (!url) return "默认";
140 return url.replace(/(?<=\/\/)[^\/]+/, '***');
141 }
142
143 static getUtf16Length(text: string): number {
144 return Buffer.from(text, 'utf16le').length / 2;

Callers 1

handleSettingsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected