lix-website/themes/lix/assets/bootstrap/node_modules/gensequence/dist/ImplAsyncSequence.js

19 lines
614 B
JavaScript
Raw Normal View History

2024-04-27 03:39:10 +00:00
"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