Skip to content

Latest commit

 

History

History
executable file
·
33 lines (21 loc) · 592 Bytes

file.md

File metadata and controls

executable file
·
33 lines (21 loc) · 592 Bytes

#file

read large file

var fs = require('fs');
var readline = require('readline');
var stream = require('stream');

var instream = fs.createReadStream('your/file');
var outstream = new stream;
var rl = readline.createInterface(instream, outstream);

rl.on('line', function(line) {
  // process line here
});

rl.on('close', function() {
  // do something on finish here
});

line by line

https://github.com/RustyMarvin/line-by-line