noddy asked this 7 years ago

Where to define handler for pipe finished in Node.js?

How to detect when pipe completed and define a callback?

Reader.pipe(Writer);

Which is better place to define callback, 

Reader.on('end', function(){

});

or

Writer.on('finish', function() {

});

or is there some other event if pipe completed?


No answers yet..