MCPcopy Index your code
hub / github.com/codeaashu/claude-code / formatCost

Function formatCost

src/cost-tracker.ts:177–179  ·  view source on GitHub ↗
(cost: number, maxDecimalPlaces: number = 4)

Source from the content-addressed store, hash-verified

175}
176
177function formatCost(cost: number, maxDecimalPlaces: number = 4): string {
178 return `$${cost > 0.5 ? round(cost, 100).toFixed(2) : cost.toFixed(maxDecimalPlaces)}`
179}
180
181function formatModelUsage(): string {
182 const modelUsageMap = getModelUsage()

Callers 3

formatModelUsageFunction · 0.85
formatTotalCostFunction · 0.85
ExtraUsageSectionFunction · 0.85

Calls 1

roundFunction · 0.85

Tested by

no test coverage detected