@qlibs/utils 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/utils/number.js +3 -3
- package/package.json +1 -1
package/dist/utils/number.js
CHANGED
@@ -46,12 +46,12 @@ function formatPriceRange(amountStart, amountEnd, currency = 'IDR') {
|
|
46
46
|
}
|
47
47
|
function formatPrice(num, currency = 'IDR') {
|
48
48
|
if (currency === 'USD') {
|
49
|
-
return formatNumber(num, 'en-US');
|
49
|
+
return formatNumber(num, 'en-US', 'USD');
|
50
50
|
}
|
51
51
|
else if (currency === 'EUR') {
|
52
|
-
return formatNumber(num, 'de-DE');
|
52
|
+
return formatNumber(num, 'de-DE', 'EUR');
|
53
53
|
}
|
54
|
-
return formatNumber(num, 'id-ID');
|
54
|
+
return formatNumber(num, 'id-ID', 'IDR');
|
55
55
|
}
|
56
56
|
function parseFormattedPrice(formattedString, currency = 'IDR') {
|
57
57
|
if (currency === 'USD') {
|