-
Notifications
You must be signed in to change notification settings - Fork 3
UtilitiesModule.Function.formatCurrency
tgreyuk edited this page Apr 25, 2024
·
1 revision
github-wiki-example / UtilitiesModule / formatCurrency
formatCurrency(
amount
,currencyCode
):string
Formats a number as currency with a given currency code. Utilizes the Intl.NumberFormat API to handle locale-specific currency formatting.
Parameter | Type | Description |
---|---|---|
amount |
number |
The numeric value to be formatted. |
currencyCode |
string |
The ISO currency code (e.g., USD, EUR) to specify the currency. |
string
The formatted currency string in the format "$1,234.56".
utilities.ts:17