We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6702d55 commit 988398aCopy full SHA for 988398a
1 file changed
src/currency.ts
@@ -151,5 +151,6 @@ export function formatCost(costUSD: number): string {
151
152
if (cost >= 1) return `${symbol}${cost.toFixed(2)}`
153
if (cost >= 0.01) return `${symbol}${cost.toFixed(3)}`
154
- return `${symbol}${cost.toFixed(4)}`
+ if (cost >= 0.0001) return `${symbol}${cost.toFixed(4)}`
155
+ return `${symbol}${cost.toFixed(2)}`
156
}
0 commit comments