1.0.0 • Published 8 years ago

file-lines-reader v1.0.0

Weekly downloads
6
License
MIT
Repository
github
Last release
8 years ago

file-lines-reader

Read some lines from a file.

FileReader reads all file content at once. This slices a file into smaller chunks and reads one at a time until the desired number of lines are found.

var reader = new FileLinesReader(/* File or Blob */ file);

reader.readLines(3).then(function(lines) {
  console.log(lines); // ["line1", "line2", "line3"]
});

reader.readLines(1).then(function(lines) {
  console.log(lines); // ["line4"]
});