aboutsummaryrefslogtreecommitdiff
path: root/node_modules/fast-glob/out/utils/stream.js
blob: 03134e9f240d857485683dc552c4e20fd6a4d01e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var merge2 = require("merge2");
/**
 * Merge multiple streams and propagate their errors into one stream in parallel.
 */
function merge(streams) {
    var mergedStream = merge2(streams);
    streams.forEach(function (stream) {
        stream.on('error', function (err) { return mergedStream.emit('error', err); });
    });
    return mergedStream;
}
exports.merge = merge;