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

cli-style

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-style

A simple tool allows you to set styles to command line output more easier.

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

cli-style

A simple tool allows you to set styles to command line output more easier.

Installation

$ npm i cli-style --save

Usage

This gadget is based on chalk, and color, bgcolor|bg, underline, bold, italic, strikethrough, dim can be used as options in cli-style, but only HEX and Keyword color modes can be used.

const style = require( 'cli-style' );

const styles = [ {
    color : 'red',
    bg : 'white',
    bold : true,
    italic : true,
    strikethrough : true,
    underline : true
}, {
    color : 'red',
    bg : 'white',
    bold : true,
    italic : true,
    strikethrough : true,
    underline : true,
    dim : true
}, {
    color : '#FF0000',
    bg : '#FFFFFF',
    bold : true,
    italic : true,
    strikethrough : true,
    underline : true,
    dim : true
}, {
    color : 'rgb( 123, 24, 64 )',
    bg : 'hsl( 32, 100, 50 )',
    bold : true,
    italic : true,
    strikethrough : true,
    underline : true,
    dim : true
}, {
    color : 'hsv(32, 100, 100)',
    bg : 'hwb(32, 0, 50)',
    bold : true,
    italic : true,
    strikethrough : true,
    underline : true,
    dim : true
} ];

for( const item of styles ) {
    console.log( style( JSON.stringify( item ), item ) );
}

Keywords

FAQs

Package last updated on 24 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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