get-last-lines
v1.0.1
Published
[](https://nodei.co/npm/get-last-lines/)
Downloads
1
Readme
Get Last N Lines
Get the last N lines of a file using node.js
Installation
npm install get-last-lines -SUsage
example reading last 5000 lines of a file
const gll = require('get-last-lines')
gll({
path: './test.log',
lines: 5000, //default 1
encoding: 'utf-8', //default 'utf-8'
newLineCharacters: ['\n'] // default ['\n']
}).then((lines) => console.log(lines));
