pop-iterate
Version:
A polymorphic iterate operator for arrays and other iterables
19 lines (15 loc) • 374 B
JavaScript
module.exports = Iteration;
function Iteration(value, done, index) {
this.value = value;
this.done = done;
this.index = index;
}
Iteration.prototype.equals = function (other) {
return (
typeof other == 'object' &&
other.value === this.value &&
other.done === this.done &&
other.index === this.index
);
};
;