pager-supports-color
v0.1.0
Published
Detect whether $PAGER supports color
Downloads
34
Maintainers
Readme
pager-supports-color
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