Answers for "how to get a particular line from a file in nodejs"

0

how to get a particular line from a file in nodejs

$ npm install --save line-reader
Posted by: Guest on June-30-2020
0

how to get a particular line from a file in nodejs

lineReader.eachLine('path/to/file', function(line) {
    console.log(line);
    if (line.includes('STOP') {
        return false; // stop reading
    }
});
Posted by: Guest on June-30-2020
0

how to get a particular line from a file in nodejs

lineReader.open('/path/to/file', function(reader) {
    if (reader.hasNextLine()) {
        reader.nextLine(function(line) {
            console.log(line);
        });
    }
});
Posted by: Guest on June-30-2020

Code answers related to "how to get a particular line from a file in nodejs"

Code answers related to "Javascript"

Browse Popular Code Answers by Language