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.
- package/esm2020/lib/collections/collection.mjs +5 -2
- package/esm2020/lib/models/client/client-invite.mjs +2 -2
- package/esm2020/lib/models/dictionary/dictionary.mjs +1 -1
- package/fesm2015/taxtank-core.mjs +4 -1
- package/fesm2015/taxtank-core.mjs.map +1 -1
- package/fesm2020/taxtank-core.mjs +4 -1
- package/fesm2020/taxtank-core.mjs.map +1 -1
- package/lib/collections/collection.d.ts +3 -0
- package/lib/models/client/client-invite.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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);
|