2 streams:
Given readable streams stream1 and stream2, what\'s an idiomatic (concise) way to get a stream containing
this can be done with vanilla nodejs
import { PassThrough } from 'stream'
const merge = (...streams) => {
let pass = new PassThrough()
let waiting = streams.length
for (let stream of streams) {
pass = stream.pipe(pass, {end: false})
stream.once('end', () => --waiting === 0 && pass.emit('end'))
}
return pass
}