@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 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 || 0;
3570
- return array.filter((v) => bignumber(v).gt(0)).reduce((t, v) => t.plus(bignumber(v)), bignumber(0)).toFixed(decimal2, rounding);
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;
@@ -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 || 0;
4737
- return array.filter((v) => bignumber(v).gt(0)).reduce((t, v) => t.plus(bignumber(v)), bignumber(0)).toFixed(decimal2, rounding);
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 || 0;
3394
- return array.filter((v) => bignumber(v).gt(0)).reduce((t, v) => t.plus(bignumber(v)), bignumber(0)).toFixed(decimal2, rounding);
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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hairy/utils",
3
3
  "type": "module",
4
- "version": "1.41.0",
4
+ "version": "1.42.0",
5
5
  "description": "Library for anywhere",
6
6
  "author": "Hairyf <wwu710632@gmail.com>",
7
7
  "license": "MIT",