You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
465 B
15 lines
465 B
"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;
|