taxtank-core 0.31.54 → 0.31.55

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.
@@ -1886,8 +1886,11 @@ class Collection {
1886
1886
  maxBy(path) {
1887
1887
  return this.items.reduce((prev, current) => (get(prev, path) > get(current, path) ? prev : current));
1888
1888
  }
1889
+ /**
1890
+ * float math issues https://stackoverflow.com/questions/12511057/float-sum-with-javascript
1891
+ */
1889
1892
  reduce(callback, init = 0) {
1890
- return this.items.reduce(callback, init);
1893
+ return +this.items.reduce(callback, init).toFixed(10);
1891
1894
  }
1892
1895
  slice(from, to) {
1893
1896
  this.items.slice(from, to);