Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
    }
});
Source by stackabuse.com #
 
PREVIOUS NEXT
Tagged: #line #file #nodejs
ADD COMMENT
Topic
Name
2+5 =