Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const listener = new Muxer(async stream => {
expect(stream).to.exist // eslint-disable-line
check()
await pipe(
stream,
tap(chunk => check()),
consume
)
check()
pipe([], stream)
})