line-by-line-reader

1.0.1 • Public • Published

Line Reader

A promise based and zero dependency javascript package for reading contents of a file in a line by line fashion

const lineReader = require ('line-by-line-reader');
 
// Grab your file from its path where you have it
let filepath = "path/to/your/file";
 
// call lineReader function get with filepath as argument
lineReader(filepath)
  .then(fileContent => {
    console.log(fileContent);
    console.log(fileContent.lines);
    console.log(fieContent.length);
  })
  .catch(err => {
    console.log(err);
  });

Package Sidebar

Install

npm i line-by-line-reader

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

1.51 kB

Total Files

3

Last publish

Collaborators

  • wonderfulboye