UNPKG

sequency

Version:

Functional sequences for processing iterable data in JavaScript

19 lines 582 B
Object.defineProperty(exports, "__esModule", { value: true }); exports.ForEach = void 0; var ForEach = /** @class */ (function () { function ForEach() { } /** * Performs the given `action` (side-effect) for each element of the sequence. * * @param {(T) => void} action */ ForEach.prototype.forEach = function (action) { for (var item = this.iterator.next(); !item.done; item = this.iterator.next()) { action(item.value); } }; return ForEach; }()); exports.ForEach = ForEach; //# sourceMappingURL=forEach.js.map