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

Function num

src/cli/dashboard.ts:41–41  ·  view source on GitHub ↗
(n: number)

Source from the content-addressed store, hash-verified

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);
44

Callers 1

buildDashboardHtmlFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected