Sha256: 6391bea7c2f77838151db09d3a26e68b919d349fc6bbb6813003e20259c16188

Contents?: true

Size: 1.78 KB

Versions: 49

Compression:

Stored size: 1.78 KB

Contents

/** PURE_IMPORTS_START .._operators_exhaust PURE_IMPORTS_END */
import { exhaust as higherOrder } from '../operators/exhaust';
/**
 * Converts a higher-order Observable into a first-order Observable by dropping
 * inner Observables while the previous inner Observable has not yet completed.
 *
 * <span class="informal">Flattens an Observable-of-Observables by dropping the
 * next inner Observables while the current inner is still executing.</span>
 *
 * <img src="./img/exhaust.png" width="100%">
 *
 * `exhaust` subscribes to an Observable that emits Observables, also known as a
 * higher-order Observable. Each time it observes one of these emitted inner
 * Observables, the output Observable begins emitting the items emitted by that
 * inner Observable. So far, it behaves like {@link mergeAll}. However,
 * `exhaust` ignores every new inner Observable if the previous Observable has
 * not yet completed. Once that one completes, it will accept and flatten the
 * next inner Observable and repeat this process.
 *
 * @example <caption>Run a finite timer for each click, only if there is no currently active timer</caption>
 * var clicks = Rx.Observable.fromEvent(document, 'click');
 * var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000).take(5));
 * var result = higherOrder.exhaust();
 * result.subscribe(x => console.log(x));
 *
 * @see {@link combineAll}
 * @see {@link concatAll}
 * @see {@link switch}
 * @see {@link mergeAll}
 * @see {@link exhaustMap}
 * @see {@link zipAll}
 *
 * @return {Observable} An Observable that takes a source of Observables and propagates the first observable
 * exclusively until it completes before subscribing to the next.
 * @method exhaust
 * @owner Observable
 */
export function exhaust() {
    return higherOrder()(this);
}
//# sourceMappingURL=exhaust.js.map

Version data entries

49 entries across 49 versions & 4 rubygems

Version Path
govuk_publishing_components-16.21.0 node_modules/rxjs/_esm5/operator/exhaust.js
govuk_publishing_components-16.20.1 node_modules/rxjs/_esm5/operator/exhaust.js
govuk_publishing_components-16.20.0 node_modules/rxjs/_esm5/operator/exhaust.js
govuk_publishing_components-16.19.0 node_modules/rxjs/_esm5/operator/exhaust.js
govuk_publishing_components-16.18.0 node_modules/rxjs/_esm5/operator/exhaust.js
govuk_publishing_components-16.17.0 node_modules/rxjs/_esm5/operator/exhaust.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/inquirer/node_modules/rxjs/_esm5/operator/exhaust.js
locomotivecms-3.4.0 app/javascript/node_modules/rxjs/_esm5/operator/exhaust.js
dragonfly_puppeteer-0.1.0 node_modules/rxjs/_esm5/operator/exhaust.js