MCPcopy Index your code
hub / github.com/simstudioai/sim / getPooledCreditsRemaining

Function getPooledCreditsRemaining

apps/sim/lib/billing/on-demand.ts:23–26  ·  view source on GitHub ↗
(usageLimit: number, currentUsage: number)

Source from the content-addressed store, hash-verified

21 * the sentinel value.
22 */
23export function getPooledCreditsRemaining(usageLimit: number, currentUsage: number): number {
24 if (usageLimit >= ON_DEMAND_UNLIMITED) return ON_DEMAND_UNLIMITED
25 return Math.max(0, usageLimit - currentUsage)
26}
27
28/**
29 * The maximum usage that is never billed: the plan's included allowance

Callers 2

on-demand.test.tsFile · 0.90
CreditsChipInnerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected