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

Function formatCurrency

packages/arctic/src/cli/cmd/stats.ts:718–724  ·  view source on GitHub ↗
(amount: number)

Source from the content-addressed store, hash-verified

716}
717
718function formatCurrency(amount: number): string {
719 if (amount === 0) return "$0.00"
720 if (amount < 0.00001) return "<$0.00001"
721 if (amount < 0.01) return `$${amount.toFixed(5)}`
722 if (amount < 1) return `$${amount.toFixed(3)}`
723 return `$${amount.toFixed(2)}`
724}

Callers 2

renderModelUsageFunction · 0.70
renderCostOverviewFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected