json-joy
Version:
Collection of libraries for building collaborative editing apps.
25 lines • 592 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.UndEndIterator = void 0;
require("./polyfill");
/**
* Creates an iterator out of {@linke UndefIterator} function.
*/
class UndEndIterator extends Iterator {
constructor(n) {
super();
this.n = n;
}
next() {
const value = this.n();
return new Res(value, value === undefined);
}
}
exports.UndEndIterator = UndEndIterator;
class Res {
constructor(value, done) {
this.value = value;
this.done = done;
}
}
//# sourceMappingURL=index.js.map