getCurrencySymbol()function
getCurrencySymbol(currency: CurrencyCode, caller: AnyCaller = getCurrencySymbol): string
| Param | Type | |
|---|---|---|
currency | CurrencyCode | The ISO 4217 currency code to get the symbol for. required |
caller | AnyCaller | The function to attribute a thrown error to (defaults to getCurrencySymbol). Defaults to getCurrencySymbol |
| Return | |
|---|---|
string | The narrow display symbol for the currency, e.g. "£" for "GBP". |
| Throws | |
|---|---|
RequiredError | If the currency code is malformed or unsupported. |
Get the display symbol used for a currency.
Examples
getCurrencySymbol("GBP"); // "£"