MCPcopy Create free account
hub / github.com/simstudioai/sim / formatPrice

Function formatPrice

apps/sim/app/(landing)/models/utils.ts:183–191  ·  view source on GitHub ↗
(price?: number | null)

Source from the content-addressed store, hash-verified

181}
182
183export function formatPrice(price?: number | null): string {
184 if (price === undefined || price === null) {
185 return 'N/A'
186 }
187
188 const formatter = price > 0 && price < 0.001 ? PRICE_NUMBER_FORMAT_4 : PRICE_NUMBER_FORMAT_3
189
190 return `$${trimTrailingZeros(formatter.format(price))}`
191}
192
193export function formatUpdatedAt(date: string): string {
194 try {

Callers 9

ModelRowFunction · 0.90
StackedCostChartFunction · 0.90
ProviderModelsPageFunction · 0.90
ImageFunction · 0.90
ModelPageFunction · 0.90
ImageFunction · 0.90
buildModelSummaryFunction · 0.85
buildProviderFaqsFunction · 0.85
buildModelFaqsFunction · 0.85

Calls 2

trimTrailingZerosFunction · 0.85
formatMethod · 0.80

Tested by

no test coverage detected