Skip to content

xmflswood/get-last-lines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Get Last N Lines

NPM

Get the last N lines of a file using node.js

Installation

npm install get-last-lines -S

Usage

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));

About

Read in the last N lines of a file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published