From ee4297280c1305c7e03bedd4df63ccf136c28c6c Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 24 Jan 2023 15:54:48 +0700 Subject: Merapihkan struktur folder --- src/core/utils/currencyFormat.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/core/utils/currencyFormat.js (limited to 'src/core/utils/currencyFormat.js') diff --git a/src/core/utils/currencyFormat.js b/src/core/utils/currencyFormat.js new file mode 100644 index 00000000..dadeaec6 --- /dev/null +++ b/src/core/utils/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 -- cgit v1.2.3