formatCurrency
Function formatCurrency
formatCurrency(amount: number, options?: { currency?: string; locale?: string }): stringFormat a number as currency using Intl.NumberFormat. Defaults to
en-US / USD. Intl is available in Node 18+, Cloudflare Workers, Deno,
and browsers, so this helper runs everywhere boxpdf does.
Parameters
-
amount: number -
options?: { currency?: string; locale?: string }
Returns string