1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 19x 15x 1x 14x 37x 7x 7x | import Iterator from '../iterators/Iterator'; Iterator.prototype.all = function all(condition) { if (!condition) { throw new Error('Missing condition'); } for (let item of this) { if (!condition(item)) { return false; } } return true; }; |