MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / formatCodingPlanPrice

Function formatCodingPlanPrice

apps/web/src/components/subscriptions/helpers.ts:72–84  ·  view source on GitHub ↗
(
  costKiloCredits: number,
  billingPeriodDays: number,
  planId?: string
)

Source from the content-addressed store, hash-verified

70}
71
72export function formatCodingPlanPrice(
73 costKiloCredits: number,
74 billingPeriodDays: number,
75 planId?: string
76): string {
77 const { amount, cadenceLabel } = getCodingPlanPriceParts(
78 costKiloCredits,
79 billingPeriodDays,
80 planId
81 );
82
83 return `${amount} ${cadenceLabel}`;
84}
85
86export function formatCodingPlanBillingAmount(amountMicrodollars: number): string {
87 const amount = Math.abs(amountMicrodollars) / 1_000_000;

Callers 3

helpers.test.tsFile · 0.90
CodingPlanDetailFunction · 0.90
CodingPlansGroupFunction · 0.90

Calls 1

getCodingPlanPricePartsFunction · 0.85

Tested by

no test coverage detected