MCPcopy Create free account
hub / github.com/TanStack/ai / parseBillableUnits

Function parseBillableUnits

packages/ai-fal/src/utils/billing.ts:33–37  ·  view source on GitHub ↗
(value: string | null)

Source from the content-addressed store, hash-verified

31 * usage rather than surfacing `NaN`.
32 */
33export function parseBillableUnits(value: string | null): number | undefined {
34 if (value == null || value === '') return undefined
35 const parsed = Number(value)
36 return Number.isFinite(parsed) ? parsed : undefined
37}
38
39/**
40 * Record the billable units carried by a fal result response, keyed by the

Callers 2

billing.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected