Skip to content

Commit

Permalink
Updated dist and version.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiocaccamo committed Sep 30, 2021
1 parent 3562935 commit abbb9d9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion dist/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,11 @@ ArrayUtil = {
return list.sort(compare);
},

sum: function(list) {
sum: function(list, callback) {
return ArrayUtil.reduce(list, function(a, b) {
if (TypeUtil.isFunction(callback)) {
return (a + callback(b));
}
return (a + b);
}, 0);
},
Expand Down
Loading

0 comments on commit abbb9d9

Please sign in to comment.