MCPcopy Create free account
hub / github.com/angular/angular / getNumberOfCurrencyDigits

Function getNumberOfCurrencyDigits

packages/common/src/i18n/locale_data_api.ts:825–832  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

823 * This function should not be used anymore. Let `Intl.NumberFormat` determine the number of digits to display for the currency
824 */
825export function getNumberOfCurrencyDigits(code: string): number {
826 let digits;
827 const currency = CURRENCIES_EN[code];
828 if (currency) {
829 digits = currency[ɵCurrencyIndex.NbOfDigits];
830 }
831 return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS;
832}

Callers 2

formatCurrencyFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected