Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

cross platform paging in your terminal for node

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 example.js
Octocat-spinner-32 example2.js
Octocat-spinner-32 index.js
Octocat-spinner-32 moar.js
Octocat-spinner-32 package.json
Octocat-spinner-32 shot.png
README.md

moar

moar is an abstraction on top of $PAGER for nodejs. That is, it helps you page data in the terminal from node.

On *nix systems, we can simply run $PAGER, and pipe the data in. If $PAGER isn't set, we default to less.

Windows has more, but it sucks. So, on Windows, we fall back to a pure javascript implementation of similar paging functionality to less.

You can install it like this:

$ npm i moar

and use it like this

var moar = require('moar');
require('request')('http://nodejs.org').pipe(moar).on('end', moar.end);

moar implements some of the writable stream interface, so you can pipe data to it or write to it.

License

MIT, as always.

Something went wrong with that request. Please try again.