Skip to content

currencyFormatter
@localizer/format-number 1.1.1

A versatile and customizable utility for formatting monetary values with currency. This formatter allows you to define how currency is displayed, including options for symbols, compact notation, and more.

Usage

typescript
import { 
currencyFormatter
} from '@localizer/format-number';
const
formatter
=
currencyFormatter
({
currencyDisplay
: 'symbol',
notation
: 'compact',
compactDisplay
: 'short',
}); const
result
=
formatter
(21436587, 'EUR');

See formatter options for configuration details.

Demo

compact
short
─── unset ───
─── unset ───
─── unset ───
symbol
─── unset ───
─── unset ───
─── unset ───
─── unset ───
─── unset ───
─── unset ───
─── unset ───
─── unset ───
─── unset ───
─── unset ───
EUR - Euro
LocaleLocalized value
en-US  American English€21,436,587.00
fr-FR  French (France)21 436 587,00 €
de-DE  German (Germany)21.436.587,00 €
fi-FI  Finnish (Finland)21 436 587,00 €
sv-FI  Swedish (Finland)21 436 587,00 €
ko-KR  Korean (South Korea)€21,436,587.00
hi-IN  Hindi (India)€2,14,36,587.00

See also