skipWhile.js 439 B

12345678910
  1. import { operate } from '../util/lift';
  2. import { createOperatorSubscriber } from './OperatorSubscriber';
  3. export function skipWhile(predicate) {
  4. return operate((source, subscriber) => {
  5. let taking = false;
  6. let index = 0;
  7. source.subscribe(createOperatorSubscriber(subscriber, (value) => (taking || (taking = !predicate(value, index++))) && subscriber.next(value)));
  8. });
  9. }
  10. //# sourceMappingURL=skipWhile.js.map