currencyToWords()
function currencyToWords( value, currencyName?, centsName?): string;Spells out an amount with its currency and cents names, e.g.
currencyToWords(12.5, 'Dollars', 'Cents') -> “Twelve Dollars And Fifty Cents”.
Cents are rounded to two decimals and omitted when zero.
Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
value |
number |
undefined |
currencyName |
string |
'' |
centsName |
string |
'Cents' |
Returns
Section titled “Returns”string