const fRead = fs.createReadStream(file); const rl = readline.createInterface({ input: fRead, }); for await (const row of rl) { // 请问这里如何判断是否最后一行? }
看文档:http://nodejs.cn/api/readline...你有两个问题
readline.Interface
await + for of
最后一行
close
1.4m articles
1.4m replys
5 comments
57.0k users