MCPcopy Create free account
hub / github.com/anomalyco/models.dev / formatCost

Function formatCost

packages/web/src/index.ts:219–224  ·  view source on GitHub ↗
(input?: number, output?: number)

Source from the content-addressed store, hash-verified

217}
218
219function formatCost(input?: number, output?: number) {
220 if (input === undefined && output === undefined) return undefined;
221 const inputText = input === undefined ? "-" : `$${input.toFixed(2)}`;
222 const outputText = output === undefined ? "-" : `$${output.toFixed(2)}`;
223 return `${inputText} / ${outputText}`;
224}
225
226function appendHighlightedText(
227 element: HTMLElement,

Callers 1

resultMetaFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected