UNPKG

@reactivex/ix-esnext-esm

Version:

The Interactive Extensions for JavaScript

19 lines (17 loc) 457 B
import { IterableX } from './iterablex'; class WhileIterable extends IterableX { constructor(condition, source) { super(); this._condition = condition; this._source = source; } *[Symbol.iterator]() { while (this._condition()) { yield* this._source; } } } export function whileDo(condition, source) { return new WhileIterable(condition, source); } //# sourceMappingURL=whiledo.mjs.map