MCPcopy
hub / github.com/dubinc/dub / toCentsNumber

Function toCentsNumber

packages/utils/src/functions/to-cents-number.ts:5–10  ·  view source on GitHub ↗
(
  value: number | bigint | null | undefined,
)

Source from the content-addressed store, hash-verified

3 * Use for display, JSON serialization, and anywhere a number is required.
4 */
5export function toCentsNumber(
6 value: number | bigint | null | undefined,
7): number {
8 if (value == null) return 0;
9 return typeof value === "bigint" ? Number(value) : value;
10}

Callers 15

currencyFormatterFunction · 0.90
formatCustomersForExportFunction · 0.90
constructWebhookPartnerFunction · 0.90
determinePartnerRewardFunction · 0.90
getPartnersFunction · 0.90
formatPartnersForExportFunction · 0.90
transformLinkFunction · 0.90
getPartnerForProgramFunction · 0.90
route.tsFile · 0.90
route.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…