UNPKG

@myorders/ember-ui

Version:

Myorders UI provides all the interface components, helpers, services and utilities for building a Myorders extension into the Console.

9 lines (6 loc) 408 B
import getCurrency from './get-currency'; import formatMoney from '@myorders/ember-accounting/utils/format-money'; export default function formatCurrency(amount = 0, currencyCode = 'USD') { let currency = getCurrency(currencyCode); return formatMoney(!currency.decimalSeparator ? amount : amount / 100, currency.symbol, currency.precision, currency.thousandSeparator, currency.decimalSeparator); }