Skip to content

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.

Parameter Type Default value
value number undefined
currencyName string ''
centsName string 'Cents'

string