lix-website/themes/lix/assets/bootstrap/node_modules/gensequence/dist/ImplAsyncSequence.js
2024-04-26 22:49:34 -06:00

19 lines
614 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const operators_1 = require("./operators");
class ImplAsyncSequence {
constructor(i) {
this.i = i;
}
get iter() {
return (typeof this.i === "function") ? this.i() : this.i;
}
[Symbol.asyncIterator]() {
return this.iter[Symbol.asyncIterator]();
}
reduceAsync(fnReduceAsync, initialValue) {
return operators_1.reduceAsyncForAsyncIterator(fnReduceAsync, initialValue)(this.iter);
}
}
exports.ImplAsyncSequence = ImplAsyncSequence;
//# sourceMappingURL=ImplAsyncSequence.js.map