diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-04-11 09:47:25 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-04-11 09:47:25 +0700 |
| commit | 92c2a229d9c9b510d71b928978872a8b107e9d5a (patch) | |
| tree | 8d8161a49a0bdc46d4c28d3f2682bb485314a41d /src/core/utils/currencyFormat.js | |
| parent | 62bebc1d33fd090d7666e18e7a0326ef7ef36897 (diff) | |
Documentation and refactor code
Diffstat (limited to 'src/core/utils/currencyFormat.js')
| -rw-r--r-- | src/core/utils/currencyFormat.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/utils/currencyFormat.js b/src/core/utils/currencyFormat.js index 12b68111..d0eba4c4 100644 --- a/src/core/utils/currencyFormat.js +++ b/src/core/utils/currencyFormat.js @@ -1,3 +1,9 @@ +/** + * Formats a numeric value as a currency string in Indonesian Rupiah (IDR) format. + * + * @param {number} value - The numeric value to be formatted as currency. + * @returns {string} - The currency string in IDR format. + */ const currencyFormat = (value) => { const currency = new Intl.NumberFormat('id-ID', { style: 'currency', |
