sequency
Version:
Functional sequences for processing iterable data in JavaScript
23 lines • 669 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.Contains = void 0;
var Contains = /** @class */ (function () {
function Contains() {
}
/**
* Returns `true` if the sequence contains the given `element`.
*
* @param {T} element
* @returns {boolean}
*/
Contains.prototype.contains = function (element) {
for (var item = this.iterator.next(); !item.done; item = this.iterator.next()) {
if (element === item.value) {
return true;
}
}
return false;
};
return Contains;
}());
exports.Contains = Contains;
//# sourceMappingURL=contains.js.map