Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

File line by line reader Node js

var lineReader = require('line-reader');

lineReader.eachLine('file.txt', function(line, last) {
  console.log(line);
  // do whatever you want with line...
  if(last){
    // or check if it's the last one
  }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #File #line #line #reader #Node #js
ADD COMMENT
Topic
Name
1+7 =