MCPcopy Create free account
hub / github.com/arctic-cli/interface / formatNumber

Function formatNumber

packages/arctic/src/cli/cmd/stats.ts:682–690  ·  view source on GitHub ↗
(num: number)

Source from the content-addressed store, hash-verified

680}
681
682function formatNumber(num: number): string {
683 if (num >= 1000000) {
684 return (num / 1000000).toFixed(1) + "m"
685 }
686 if (num >= 1000) {
687 return (num / 1000).toFixed(1) + "k"
688 }
689 return num.toString()
690}
691
692function formatDuration(ms: number): string {
693 const seconds = Math.floor(ms / 1000)

Callers 3

displayStatsFunction · 0.70
renderModelUsageFunction · 0.70
renderCostOverviewFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected