gpt4 book ai didi

javascript - Node 'readline' 模块没有 'end' 事件 - 当没有更多行时我该怎么做?

转载 作者:IT老高 更新时间:2023-10-28 21:56:02 25 4
gpt4 key购买 nike

阅读 the official docs for the readline module ,没有像其他流一样的 end 事件。尝试

reader.on('end', cb);

不起作用。

当没有更多行要读取时,如何运行回调?

最佳答案

没关系,它是关闭

reader.on('close', cb);

关于javascript - Node 'readline' 模块没有 'end' 事件 - 当没有更多行时我该怎么做?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22915794/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com