Skip to content

armgit / papra

Public Imported from GitHub
0

The minimalistic document archiving platform.

315 B
Raw Blame
export function formatAmountInCents({
  amountInCents,
  currency = 'USD',
}: {
  amountInCents: number;
  currency?: string;
}): string {
  return new Intl.NumberFormat('en-US', {
    style: 'currency',
    currency,
    minimumFractionDigits: 2,
    currencyDisplay: 'symbol',
  }).format(amountInCents / 100);
}