1lineReader.open('/path/to/file', function(reader) {
2 if (reader.hasNextLine()) {
3 reader.nextLine(function(line) {
4 console.log(line);
5 });
6 }
7});
8
1lineReader.eachLine('path/to/file', function(line) {
2 console.log(line);
3 if (line.includes('STOP') {
4 return false; // stop reading
5 }
6});
7