diff options
Diffstat (limited to 'src/helpers/currencyFormat.js')
| -rw-r--r-- | src/helpers/currencyFormat.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/helpers/currencyFormat.js b/src/helpers/currencyFormat.js new file mode 100644 index 00000000..dadeaec6 --- /dev/null +++ b/src/helpers/currencyFormat.js @@ -0,0 +1,8 @@ +export default function currencyFormat(value) { + const currency = new Intl.NumberFormat('id-ID', { + style: 'currency', + currency: 'IDR', + maximumFractionDigits: 0 + }); + return currency.format(value); +}
\ No newline at end of file |
