Statements | Branches | Functions | Lines |
---|---|---|---|
Work with price values in JavaScript in a simplified way.
Support for USD and BRL
Using npm:
npm install make-currency
Using yarn:
yarn add make-currency
Using jsDelivr CDN:
<script src="https://cdn.jsdelivr.net/npm/make-currency/dist/make.min.js"></script>
Using unpkg CDN:
<script src="https://unpkg.com/make-currency/dist/make.min.js"></script>
- Vanilla JS → Preview
- React → Preview
In the current version BRL for floatValue
or stringValue
typed | input value | float value | string value |
---|---|---|---|
0,00 | 0.00 | 0,00 | |
1 | 0,01 | 0.01 | 0,01 |
12 | 0,12 | 0.12 | 0,12 |
123 | 1,23 | 1.23 | 1,23 |
1234 | 12,34 | 12.34 | 12,34 |
12345 | 123,45 | 123.45 | 123,45 |
123456 | 1.234,56 | 1234.56 | 1.234,56 |
1234567 | 12.345,67 | 12345.67 | 12.345,67 |
12345678 | 123.456,78 | 123456.78 | 123,456,78 |
123456789 | 1.234.567,89 | 1234567.89 | 1.234.567,89 |
en: More coins will be available soon!
pt: Em breve mais moedas estará disponÃvel!
es: ¡Más monedas estarán disponibles pronto!
Feel free to raise an issue on Github if you find a bug or have a feature request