Class: CurrencyService
Constructors
Constructor
new CurrencyService():
CurrencyService
Returns
CurrencyService
Methods
formatCurrencyForDisplay()
formatCurrencyForDisplay(
currency,amount):string
Returns a formatted string representing a given amount with desired currency.
Parameters
currency
Currency
The currency to represent the amount in.
amount
number
The amount in minor units to format.
Returns
string
getPrecisionForCurrency()
getPrecisionForCurrency(
currency):number
Get the number of decimal places expected in a currency string.
Parameters
currency
Currency
The currency to determine precision for.
Returns
number