/count-lines-in-file

Counts the number of lines in a file using fs.createReadStream and split.

Primary LanguageJavaScriptMIT LicenseMIT

countLinesInFile

NPM version Travis build status js-canonical-style

Counts the number of lines in a file using fs.createReadStream and split.

const countLinesInFile = require('count-lines-in-file');
const path = require('path');
const targetFilePath = path.resolve(__dirname, './data.txt');

countLinesInFile(targetFilePath, (error: Error, nuberOfLines: number) => {

});