Javascript Currency Formatter. Has implemented in React Native version 0.53.0
GPL-2.0 License
This is the JavaScript widget used only IDR and USD, you can change according to your needs. If you use for IDR, the value or price is automatically round a number upward to its nearest integer:
This widget has implemented in React Native version 0.53.0.
npm i react-native-currency-formatter
Config the currency
const currencyCode = 'IDR '; // IDR or USD
const currencyPosition = 'left' // left or right
const maxFractionDigits = 2;
const decimalSeparator = ',';
const thousandSeparator = '.';
import CurrencyFormatter from '_YOUR_ROOT_FILE/CurrencyFormatter';
${ CurrencyFormatter(value_of_price) }
${ CurrencyFormatter(1234511) }
IDR 1.234.511
${ CurrencyFormatter(1234511.47) }
IDR 1,234,511.47