diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-01-24 15:54:48 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-01-24 15:54:48 +0700 |
| commit | ee4297280c1305c7e03bedd4df63ccf136c28c6c (patch) | |
| tree | 62eb00777f42542a37c63687dd1536f8f56df894 /src/core/utils/currencyFormat.js | |
| parent | 23b31aa10302cc990f3fb083b8189233b2e9e08d (diff) | |
Merapihkan struktur folder
Diffstat (limited to 'src/core/utils/currencyFormat.js')
| -rw-r--r-- | src/core/utils/currencyFormat.js | 8 |
1 files changed, 8 insertions, 0 deletions
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 |
