Comparing version 1.13.3 to 1.13.4
@@ -0,1 +1,8 @@ | ||
v1.13.4 | ||
======= | ||
2018-05-21T23:38:30Z | ||
Fix a bug of `sum`, `average` and `product` method of `Array` when the array is empty. | ||
v1.13.3 | ||
@@ -2,0 +9,0 @@ ======= |
{ | ||
"name": "fus-ext", | ||
"version": "1.13.3", | ||
"version": "1.13.4", | ||
"description": "FutureScript Extension", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -303,14 +303,18 @@ "use strict"; | ||
return (() => { | ||
return arr.length === 1 ? (() => { | ||
return _elementOrUseSelector(dotDotCalc_573300145710716007(_main.dotDot_573300145710716007, arr, "first", []), selector); | ||
return arr.length === 0 ? (() => { | ||
return 0; | ||
})() : (() => { | ||
return arr.reduce(function (a, b, index) { | ||
return (() => { | ||
return (index === 1 ? (() => { | ||
return _elementOrUseSelector(a, selector); | ||
})() : (() => { | ||
return a; | ||
})()) + _elementOrUseSelector(b, selector); | ||
})(); | ||
}); | ||
return arr.length === 1 ? (() => { | ||
return _elementOrUseSelector(dotDotCalc_573300145710716007(_main.dotDot_573300145710716007, arr, "first", []), selector); | ||
})() : (() => { | ||
return arr.reduce(function (a, b, index) { | ||
return (() => { | ||
return (index === 1 ? (() => { | ||
return _elementOrUseSelector(a, selector); | ||
})() : (() => { | ||
return a; | ||
})()) + _elementOrUseSelector(b, selector); | ||
})(); | ||
}); | ||
})(); | ||
})(); | ||
@@ -320,3 +324,7 @@ })(); | ||
return (() => { | ||
return dotDotCalc_573300145710716007(_main.dotDot_573300145710716007, arr, "sum", [selector]) / arr.length; | ||
return arr.length === 0 ? (() => { | ||
return (0, _main.fail)(); | ||
})() : (() => { | ||
return dotDotCalc_573300145710716007(_main.dotDot_573300145710716007, arr, "sum", [selector]) / arr.length; | ||
})(); | ||
})(); | ||
@@ -329,14 +337,18 @@ };exports.median = median = function (arr, selector) { | ||
return (() => { | ||
return arr.length === 1 ? (() => { | ||
return _elementOrUseSelector(dotDotCalc_573300145710716007(_main.dotDot_573300145710716007, arr, "first", []), selector); | ||
return arr.length === 0 ? (() => { | ||
return 1; | ||
})() : (() => { | ||
return arr.reduce(function (a, b, index) { | ||
return (() => { | ||
return (index === 1 ? (() => { | ||
return _elementOrUseSelector(a, selector); | ||
})() : (() => { | ||
return a; | ||
})()) * _elementOrUseSelector(b, selector); | ||
})(); | ||
}); | ||
return arr.length === 1 ? (() => { | ||
return _elementOrUseSelector(dotDotCalc_573300145710716007(_main.dotDot_573300145710716007, arr, "first", []), selector); | ||
})() : (() => { | ||
return arr.reduce(function (a, b, index) { | ||
return (() => { | ||
return (index === 1 ? (() => { | ||
return _elementOrUseSelector(a, selector); | ||
})() : (() => { | ||
return a; | ||
})()) * _elementOrUseSelector(b, selector); | ||
})(); | ||
}); | ||
})(); | ||
})(); | ||
@@ -343,0 +355,0 @@ })(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
377804
4473
0