1.0.1 • Published 5 years ago

file-readline v1.0.1

Weekly downloads
4
License
ISC
Repository
github
Last release
5 years ago

file-readline

Read file line by line. Not so fast, but simple and easy to use.

install

npm install file-readline

exemple

const FileReadLine = require('file-readline');

const file = './test.js';
const rl = new FileReadLine(file);
let i = 0;
// eslint-disable-next-line no-await-in-loop
while (await rl.next() !== false) {
    i += 1;
}
console.log(`${file} has ${i} lines`);