Home > widget-integration > FilterHelper > formatMoney
FilterHelper.formatMoney() method
Formats money value according to specified format options
Signature:
formatMoney(money: number | string, format?: string, withTrailingZeros?: boolean, showCentAsSuperscript?: boolean, removePriceDecimal?: boolean, removeDecimalPoint?: boolean): string;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
money |
number | string |
Money value to format |
|
format |
string |
(Optional) Format string |
|
withTrailingZeros |
boolean |
(Optional) Include trailing zeros |
|
showCentAsSuperscript |
boolean |
(Optional) Display cents as superscript |
|
removePriceDecimal |
boolean |
(Optional) Remove decimal part |
|
removeDecimalPoint |
boolean |
(Optional) Remove decimal point |
Returns:
string
Formatted money string