import DefaultFormatter from '@eastsideco/escshopify/src/plugins/easycurrency/formatters/DefaultFormatter.js'DefaultFormatter
Extends:
Formatter → DefaultFormatter
A default formatting implementation. Formats most currencies as $00.00, except JPY which is 00 $
Method Summary
| Public Methods | ||
| public |
Format a currency. |
|
| Private Methods | ||
| private |
_formatPrefixedSymbolTwoDecimal(amount: Number, currencyInfo: Object, space: Boolean): String Format as $00.00 |
|
| private |
_suffixSymbolNoDecimal(amount: Number, currencyInfo: Object, space: Boolean): String Format as 00 $ |
|
Inherited Summary
| From class Formatter | ||
| public |
Format a currency. |
|
Public Methods
public format(amount: type, currency: type): String source
Format a currency.
Override:
Formatter#formatParams:
| Name | Type | Attribute | Description |
| amount | type | Amount in cents. |
|
| currency | type | Currency code to convert to. |