@hairy/utils 0.7.0 → 0.7.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/index.cjs +9 -1
- package/dist/index.mjs +9 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1772,7 +1772,15 @@ function formatNumeric(value = "0", options) {
|
|
|
1772
1772
|
decimals = 2
|
|
1773
1773
|
} = options || {};
|
|
1774
1774
|
const config = parseNumeric(value, delimiters || []);
|
|
1775
|
-
const number = unum(value).div(config.v).toFormat(decimals, rounding,
|
|
1775
|
+
const number = unum(value).div(config.v).toFormat(decimals, rounding, {
|
|
1776
|
+
decimalSeparator: ".",
|
|
1777
|
+
groupSeparator: ",",
|
|
1778
|
+
groupSize: 3,
|
|
1779
|
+
secondaryGroupSize: 0,
|
|
1780
|
+
fractionGroupSeparator: " ",
|
|
1781
|
+
fractionGroupSize: 0,
|
|
1782
|
+
...format
|
|
1783
|
+
});
|
|
1776
1784
|
return `${number}${config.n}`;
|
|
1777
1785
|
}
|
|
1778
1786
|
|
package/dist/index.mjs
CHANGED
|
@@ -1692,7 +1692,15 @@ function formatNumeric(value = "0", options) {
|
|
|
1692
1692
|
decimals = 2
|
|
1693
1693
|
} = options || {};
|
|
1694
1694
|
const config = parseNumeric(value, delimiters || []);
|
|
1695
|
-
const number = unum(value).div(config.v).toFormat(decimals, rounding,
|
|
1695
|
+
const number = unum(value).div(config.v).toFormat(decimals, rounding, {
|
|
1696
|
+
decimalSeparator: ".",
|
|
1697
|
+
groupSeparator: ",",
|
|
1698
|
+
groupSize: 3,
|
|
1699
|
+
secondaryGroupSize: 0,
|
|
1700
|
+
fractionGroupSeparator: " ",
|
|
1701
|
+
fractionGroupSize: 0,
|
|
1702
|
+
...format
|
|
1703
|
+
});
|
|
1696
1704
|
return `${number}${config.n}`;
|
|
1697
1705
|
}
|
|
1698
1706
|
|