0

When it comes to process.stdin, does anybody know the difference between the end and finish events?

   process.stdin.resume()
    .once('end', function(){
      log.info('stdin has ended.');
    })
    .once('finish', function(){
      log.info('stdin has finished.');  
    });

looks like 'finished' event is called first, 'end' event is fired afterwards. What does these events signify more exactly?

Is process.stdin a duplex stream since it fires both events?

Alexander Mills
  • 90,741
  • 139
  • 482
  • 817

0 Answers0