Typedef
Static Public Summary | ||
public |
CurrencyFormat: Format Currency format interface. |
|
public |
The library's settings configuration interface. |
Static Public
public CurrencyFormat: Format source
Currency format interface.
Each property represents template string used by formatMoney. Inside this template you can use these patterns:
- %s - Currency symbol
- %v - Amount
Examples:
'%s %v' => '$ 1.00'
'%s (%v)' => '$ (1.00)'
'%s -- ' => '$ --'
public Settings: Object source
The library's settings configuration interface.
Properties:
Name | Type | Attribute | Description |
symbol | String |
|
Currency symbol |
format | String | CurrencyFormat |
|
Controls output: %s = symbol, %v = value (can be object, see docs) |
decimal | String |
|
Decimal point separator |
thousand | String |
|
Thousands separator |
precision | Number |
|
Number of decimal places to round the amount to |
grouping | Number |
|
Digit grouping (not implemented yet) |
stripZeros | Boolean |
|
Strip insignificant zeros from decimal part |
fallback | Float |
|
Value returned on unformat() failure |