Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

supports-color-cli

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

supports-color-cli - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

18

cli.js

@@ -6,6 +6,15 @@ #!/usr/bin/env node

meow({
var cli = meow({
help: [
'Example',
'Usage',
' $ supports-color [--<256|16m>]',
'',
'Options',
' --256 Check for 256 color support',
' --16m Check for 16 million color support (True Color)',
'',
'Examples',
' $ supports-color',
' $ supports-color --256',
' $ supports-color --16m',
'',

@@ -16,2 +25,5 @@ 'Exits with code 0 if color is supported and 1 if not'

process.exit(supportsColor ? 0 : 1);
var flags = cli.flags;
var level = flags['256'] ? 'has256' : flags['16m'] ? 'has16m' : 'hasBasic';
process.exit(supportsColor[level] ? 0 : 1);

7

package.json
{
"name": "supports-color-cli",
"version": "1.0.0",
"version": "1.1.0",
"description": "Detect whether a terminal supports color",

@@ -14,3 +14,4 @@ "license": "MIT",

"Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
"Joshua Appelman <jappelman@xebia.com> (jbnicolai.com)"
"Joshua Appelman <jappelman@xebia.com> (jbnicolai.com)",
"JD Ballard <i.am.qix@gmail.com> (github.com/qix-)"
],

@@ -52,3 +53,3 @@ "bin": {

"meow": "^3.3.0",
"supports-color": "^2.0.0"
"supports-color": "^3.0.0"
},

@@ -55,0 +56,0 @@ "devDependencies": {

@@ -18,4 +18,13 @@ # supports-color-cli [![Build Status](https://travis-ci.org/chalk/supports-color-cli.svg?branch=master)](https://travis-ci.org/chalk/supports-color-cli)

Example
Usage
$ supports-color [--<256|16m>]
Options
--256 Check for 256 color support
--16m Check for 16 million color support (True Color)
Examples
$ supports-color
$ supports-color --256
$ supports-color --16m

@@ -22,0 +31,0 @@ Exits with code 0 if color is supported and 1 if not

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc