MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / formatCost

Function formatCost

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

Source from the content-addressed store, hash-verified

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

Callers 4

formatModelUsageFunction · 0.85
formatTotalCostFunction · 0.85
BuiltinStatusLineInnerFunction · 0.85
ExtraUsageSectionFunction · 0.85

Calls 1

roundFunction · 0.85

Tested by

no test coverage detected