Naval Pilgrim's Mayflower

    node-pager

    0.3.6 • Public • Published

    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)

    Install

    npm i node-pager

    DownloadsWeekly Downloads

    6,328

    Version

    0.3.6

    License

    MIT

    Unpacked Size

    2.82 kB

    Total Files

    6

    Last publish

    Collaborators

    • slammayjammay