MCPcopy
hub / github.com/anomalyco/models.dev / formatCost

Function formatCost

packages/web/src/shared.ts:39–41  ·  view source on GitHub ↗
(cost?: number)

Source from the content-addressed store, hash-verified

37}
38
39export function formatCost(cost?: number) {
40 return cost === undefined ? "-" : `$${cost.toFixed(2)}`;
41}
42
43export function formatNumber(value?: number) {
44 return value === undefined ? "-" : value.toLocaleString();

Callers 1

costSummaryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected