Skip to content

alfonsodev/read-lines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status

read-lines

Read big files, line by line.

npm install read-lines

##Usage The module emits the first line and then stops until you call the
next() callback, in this way you can make async stuff with your line
and call next() when your are done.

var ReadLines = require('read-lines');
var file = new ReadLines('/path/to/my/file');

file.on('open', function() {
  //call read for start reading the first line
  file.read(); 
});

file.on('line', function(line, next) {
  console.log(line);
  //You call next to get the next line
  next();
});

file.on('error', function(err) {
  // handle here the errors
});

About

Line by line big file reader.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published