From 92c2a229d9c9b510d71b928978872a8b107e9d5a Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 11 Apr 2023 09:47:25 +0700 Subject: Documentation and refactor code --- src/core/utils/currencyFormat.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/core/utils/currencyFormat.js') 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', -- cgit v1.2.3