1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/fast-glob/package/out/utils/stream.js

15 lines
451 B
JavaScript
Raw Permalink Normal View History

2023-12-18 13:12:25 +08:00
"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;