file-lines-reader

1.0.0 • Public • Published

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"]
});

Readme

Keywords

Package Sidebar

Install

npm i file-lines-reader

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • nawatts