MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / esc

Function esc

src/cli/dashboard.ts:40–40  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

38 /** Version + whether the git checkout is behind its remote (populated best-effort). */
39 update?: { version?: string; updateAvailable: boolean; behind: number; message: string; ok: boolean };
40}
41
42const esc = (s: string) => String(s).replace(/[&<>"]/g, c => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;' }[c]!));
43const num = (n: number) => n >= 1000 ? `${(n / 1000).toFixed(n >= 100000 ? 0 : 1)}k` : String(n);

Callers 3

buildDashboardHtmlFunction · 0.70
modelSelectFunction · 0.70
notify.test.tsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected