json-joy
Version:
Collection of libraries for building collaborative editing apps.
24 lines • 474 B
JavaScript
import './polyfill';
/**
* Creates an iterator out of {@linke UndefIterator} function.
*/
export class UndEndIterator extends Iterator {
n;
constructor(n) {
super();
this.n = n;
}
next() {
const value = this.n();
return new Res(value, value === undefined);
}
}
class Res {
value;
done;
constructor(value, done) {
this.value = value;
this.done = done;
}
}
//# sourceMappingURL=index.js.map