@hairy/utils 1.41.0 → 1.42.0
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 +2 -2
- package/dist/index.global.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3566,8 +3566,8 @@ function lt(a, b) {
|
|
|
3566
3566
|
}
|
|
3567
3567
|
function plus(array, options) {
|
|
3568
3568
|
const rounding = options?.r || Bignumber.ROUND_DOWN;
|
|
3569
|
-
const decimal2 = options?.d ||
|
|
3570
|
-
return array.filter((v) => bignumber(v).gt(0)).reduce((t, v) => t.plus(
|
|
3569
|
+
const decimal2 = options?.d || 6;
|
|
3570
|
+
return array.filter((v) => bignumber(v).gt(0)).reduce((t, v) => t.plus(numberish(v)), bignumber(0)).toFixed(decimal2, rounding);
|
|
3571
3571
|
}
|
|
3572
3572
|
function divs(array, options) {
|
|
3573
3573
|
const rounding = options?.r || Bignumber.ROUND_DOWN;
|
package/dist/index.global.js
CHANGED
|
@@ -4733,8 +4733,8 @@
|
|
|
4733
4733
|
}
|
|
4734
4734
|
function plus(array, options) {
|
|
4735
4735
|
const rounding = options?.r || Bignumber.ROUND_DOWN;
|
|
4736
|
-
const decimal2 = options?.d ||
|
|
4737
|
-
return array.filter((v) => bignumber(v).gt(0)).reduce((t, v) => t.plus(
|
|
4736
|
+
const decimal2 = options?.d || 6;
|
|
4737
|
+
return array.filter((v) => bignumber(v).gt(0)).reduce((t, v) => t.plus(numberish(v)), bignumber(0)).toFixed(decimal2, rounding);
|
|
4738
4738
|
}
|
|
4739
4739
|
function divs(array, options) {
|
|
4740
4740
|
const rounding = options?.r || Bignumber.ROUND_DOWN;
|
package/dist/index.js
CHANGED
|
@@ -3390,8 +3390,8 @@ function lt(a, b) {
|
|
|
3390
3390
|
}
|
|
3391
3391
|
function plus(array, options) {
|
|
3392
3392
|
const rounding = options?.r || Bignumber.ROUND_DOWN;
|
|
3393
|
-
const decimal2 = options?.d ||
|
|
3394
|
-
return array.filter((v) => bignumber(v).gt(0)).reduce((t, v) => t.plus(
|
|
3393
|
+
const decimal2 = options?.d || 6;
|
|
3394
|
+
return array.filter((v) => bignumber(v).gt(0)).reduce((t, v) => t.plus(numberish(v)), bignumber(0)).toFixed(decimal2, rounding);
|
|
3395
3395
|
}
|
|
3396
3396
|
function divs(array, options) {
|
|
3397
3397
|
const rounding = options?.r || Bignumber.ROUND_DOWN;
|