# Code coverage report for RxJS/dist/cjs/operators/concat.js

## Statements: 93.33% (14 / 15) Branches: 75% (6 / 8) Functions: 100% (2 / 2) Lines: 92.86% (13 / 14) Ignored: none

All files » RxJS/dist/cjs/operators/ » concat.js

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34

    1
    1

    1

    1

    1

    1
    17
    17

    17
    17
    17

    17

    1'use strict';

    exports.__esModule = true;
    exports['default'] = concat;

    function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

    var _Observable = require('../Observable');

    var _Observable2 = _interopRequireDefault(_Observable);

    /**
     * Joins this observable with multiple other observables by subscribing to them one at a time, starting with the source,
     * and merging their results into the returned observable. Will wait for each observable to complete before moving
     * on to the next.
     * @params {...Observable} the observables to concatenate
     * @params {Scheduler} [scheduler] an optional scheduler to schedule each observable subscription on.
     * @returns {Observable} All values of each passed observable merged into a single observable, in order, in serial fashion.
     */

    function concat() {
        for (var _len = arguments.length, observables = Array(_len), _key = 0; _key < _len; _key++) {
            observables[_key] = arguments[_key];
        }

        var args = observables;
        args.unshift(this);
        Iif (args.length > 1 && typeof args[args.length - 1].schedule === 'function') {
            args.splice(args.length - 2, 0, 1);
        }
        return _Observable2['default'].fromArray(args).mergeAll(1);
    }

    module.exports = exports['default'];