linq-extensions
Version:
Linq-like extension methods for JavaScript and TypeScript builtin collections
21 lines • 787 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SelectManyIterable = void 0;
const iterable_1 = require("../iterable");
class SelectManyIterable extends iterable_1.Iterable {
constructor(iterable, collectionSelector, resultSelector) {
super();
this.iterable = iterable;
this.collectionSelector = collectionSelector;
this.resultSelector = resultSelector;
}
*[Symbol.iterator]() {
for (const element of this.iterable) {
for (const collectionElement of this.collectionSelector(element)) {
yield this.resultSelector(element, collectionElement);
}
}
}
}
exports.SelectManyIterable = SelectManyIterable;
//# sourceMappingURL=select-many-iterable.js.map