katoikia-app/web-ui/web-react/node_modules/fast-glob/package/out/utils/stream.js

15 lines
465 B
JavaScript
Raw Normal View History

2022-07-06 04:15:11 +00: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;