MCPcopy Index your code
hub / github.com/anomalyco/models.dev / formatDecimal

Function formatDecimal

packages/core/script/generate-wandb.ts:152–154  ·  view source on GitHub ↗
(n: number)

Source from the content-addressed store, hash-verified

150}
151
152function formatDecimal(n: number): string {
153 return Number(n.toFixed(6)).toString();
154}
155
156function priceToPerMillion(value: string): number {
157 return Number((parseFloat(value) * 1_000_000).toFixed(6));

Callers 1

formatTomlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected