Closed szmarczak closed 1 year ago
Seems like a Node.js fault. This gives the same result:
import {PassThrough, pipeline} from 'stream';
const first = new PassThrough();
const second = new PassThrough();
first.on('readable', () =>{
console.log('readable');
});
pipeline(first, second, error => {
console.log(`finished! error=${error}`);
});
first.push('foobar');
first.push(null);
second.resume();
Since this is a problem with Node.js itself, should this be closed? This library just iterates over the stream, it does not do anything special related to the above behavior.
Result:
Expected: