The
'resume' Event in a Readable Stream is emitted when stream.resume() is being called and
readableFlowing property is not true.
Syntax:
Event: 'resume'
Return Value: It is emitted if readable.resume() is being called else it is not emitted.
Below examples illustrate the use of
resume event in Node.js:
Example 1:
Output:
Program ends....
resume emitted!
GeeksforGeeks
Example 2:
Output:
Done....
GeeksforGeeks
No additional data will be displayed for 3 seconds.
Now data starts flowing again.
resume emitted!
Reference: https://nodejs.org/api/stream.html#stream_event_resume