Sha256: 7f35df92fd08e7255a3eedf5dda6771b3ba3ac4b1a51c9dc17c864d753b60d28

Contents?: true

Size: 1.5 KB

Versions: 49

Compression:

Stored size: 1.5 KB

Contents

/** PURE_IMPORTS_START .._operators_mergeScan PURE_IMPORTS_END */
import { mergeScan as higherOrder } from '../operators/mergeScan';
/**
 * Applies an accumulator function over the source Observable where the
 * accumulator function itself returns an Observable, then each intermediate
 * Observable returned is merged into the output Observable.
 *
 * <span class="informal">It's like {@link scan}, but the Observables returned
 * by the accumulator are merged into the outer Observable.</span>
 *
 * @example <caption>Count the number of click events</caption>
 * const click$ = Rx.Observable.fromEvent(document, 'click');
 * const one$ = click$.mapTo(1);
 * const seed = 0;
 * const count$ = one$.mergeScan((acc, one) => Rx.Observable.of(acc + one), seed);
 * count$.subscribe(x => console.log(x));
 *
 * // Results:
 * 1
 * 2
 * 3
 * 4
 * // ...and so on for each click
 *
 * @param {function(acc: R, value: T): Observable<R>} accumulator
 * The accumulator function called on each source value.
 * @param seed The initial accumulation value.
 * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of
 * input Observables being subscribed to concurrently.
 * @return {Observable<R>} An observable of the accumulated values.
 * @method mergeScan
 * @owner Observable
 */
export function mergeScan(accumulator, seed, concurrent) {
    if (concurrent === void 0) {
        concurrent = Number.POSITIVE_INFINITY;
    }
    return higherOrder(accumulator, seed, concurrent)(this);
}
//# sourceMappingURL=mergeScan.js.map

Version data entries

49 entries across 49 versions & 4 rubygems

Version Path
govuk_publishing_components-17.8.0 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-17.7.0 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-17.6.1 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-17.6.0 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-17.5.0 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-17.4.0 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-17.3.0 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-17.2.0 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-17.1.1 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-17.1.0 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-17.0.0 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-16.29.0 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-16.28.0 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-16.27.1 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-16.27.0 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-16.26.0 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-16.25.0 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-16.24.0 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-16.23.0 node_modules/rxjs/_esm5/operator/mergeScan.js
govuk_publishing_components-16.22.0 node_modules/rxjs/_esm5/operator/mergeScan.js