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
Locale | Localized value |
---|---|
en-US | €21,436,587.00 |
fr-FR | 21 436 587,00 € |
de-DE | 21.436.587,00 € |
fi-FI | 21 436 587,00 € |
sv-FI | 21 436 587,00 € |
ko-KR | €21,436,587.00 |
hi-IN | €2,14,36,587.00 |