JSPM

pager-supports-color

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 71
  • Score
    100M100P100Q107948F
  • License MIT

Detect whether $PAGER supports color

Package Exports

  • pager-supports-color

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pager-supports-color) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm

pager-supports-color

Build Status Dependency Status

Detect whether $PAGER supports ANSI color escape sequences.

Usage

pagerSupportsColor('less')
//=> false

pagerSupportsColor('less', ['-R'])
//=> true

process.env.PAGER = 'less';
process.env.LESS = '-R';
pagerSupportsColor()
//=> true

API

pagerSupportsColor([pager], [argv])

pager defaults to process.env.PAGER.

Returns true or false.

Install

npm install pager-supports-color

License

MIT