Is there a way to prevent Readline module from removing a whitespace that comes before the line break in the file itself? I'm parsing a non text file and those spaces are important.
And why a Reader modifies the file it reads?
I've tried using a terminal mode, no success there...
const readline = require('readline');
const fs = require('fs');
...
// Init reader interface
this.lineReader = readline.createInterface({
input: fs.createReadStream(this.inputFile),
terminal: true
});
this.lineReader.on('line', (line) => {
return callback(null, line);
});