I need to read a multiline txt file and do some manipulations with each line. I'm trying to use readline but I can't figure out how to use the lines it reads. Here I use the most standard readline code:
const readline = require ('readline')
const fs = require ('fs')
const rl = readline.createInterface({
input: fs.createReadStream('price.txt'),
})
rl.on('line', function(line){
console.log(line)
})