事件:'pause'


【Event: 'pause'

当发生以下情况之一时,会触发 'pause' 事件:

【The 'pause' event is emitted when one of the following occur:】

  • input 流已暂停。
  • input 流未暂停并接收到 'SIGCONT' 事件。(见事件 'SIGTSTP''SIGCONT'。)

调用监听器函数时不传入任何参数。

【The listener function is called without passing any arguments.】

rl.on('pause', () => {
  console.log('Readline paused.');
});