count-lines-in-file
v1.1.0
Published
Counts the number of lines in a file.
Downloads
2,064
Readme
countLinesInFile
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, numberOfLines: number) => {
});