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
2.1m questions
2.1m answers
60 comments
57.0k users