All files / src/sum Iterator.sum.js

100% Statements 3/3
100% Branches 0/0
100% Functions 2/2
100% Lines 2/2
1 2 3 4 5 6 7      18x 16x    
import Iterator from '../iterators/Iterator';
import '../aggregate';
 
Iterator.prototype.sum = function sum() {
  return this.aggregate((prev, curr) => prev + curr, 0);
};