UNPKG

sequency

Version:

Functional sequences for processing iterable data in JavaScript

23 lines 640 B
Object.defineProperty(exports, "__esModule", { value: true }); exports.All = void 0; var All = /** @class */ (function () { function All() { } /** * Returns `true` if all elements match the given `predicate`. * * @param {(T) => boolean} predicate * @returns {boolean} */ All.prototype.all = function (predicate) { for (var item = this.iterator.next(); !item.done; item = this.iterator.next()) { if (!predicate(item.value)) { return false; } } return true; }; return All; }()); exports.All = All; //# sourceMappingURL=all.js.map