【发布时间】:2014-05-19 21:29:17
【问题描述】:
阅读the official docs for the readline module,没有像其他流一样的end事件。
尝试
reader.on('end', cb);
不起作用。
当没有更多行要读取时,如何运行回调?
【问题讨论】:
标签: javascript node.js readline
阅读the official docs for the readline module,没有像其他流一样的end事件。
尝试
reader.on('end', cb);
不起作用。
当没有更多行要读取时,如何运行回调?
【问题讨论】:
标签: javascript node.js readline
没关系,我是close。
reader.on('close', cb);
【讨论】:
reader.input 有一个end 事件