'pause' 事件
发生以下情况之一时会触发 'pause' 事件:
调用监听器函数时不传入任何参数。
rl.on('pause', () => {
console.log('Readline paused.');
});The 'pause' event is emitted when one of the following occur:
- The
inputstream is paused. - The
inputstream is not paused and receives the'SIGCONT'event. (See events'SIGTSTP'and'SIGCONT'.)
The listener function is called without passing any arguments.
rl.on('pause', () => {
console.log('Readline paused.');
});