Skip to content

A super simple module that outputs text into a pager.

License

Notifications You must be signed in to change notification settings

dineshkumar02/node-pager

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-pager

A super simple module that outputs text into less.

Usage

Install

$ npm install --save node-pager

Require

const fs = require('fs')
const pager = require('node-pager')

// read file contents and print to a pager
fs.readFile('somefile.txt', (err, data) => {
  pager(data.toString('utf8')).then(() => {
    console.log('pager exited')
  })
})

You can specify options to be passed to less (only if your platform is not windows).

pager('my string', '-F'); // less -F
pager('my string'); // by default less -R (allows colors)

About

A super simple module that outputs text into a pager.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.9%
  • PowerShell 3.1%