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

colorprint

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

colorprint

Print ansi-colored message to stdout/stderr.

  • 1.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
402
decreased by-50.06%
Maintainers
1
Weekly downloads
 
Created
Source

colorprint

Print ansi-colored message to stdout/stderr.

Build Status Code Climate Code Coverage dependencies npm version Gratipay

Table of Contents

How to

Usage

var colorpint = require('colorpint');
colorpint.info('This is INFO'); //Pipe to stdout with green color.
colorpint.debug('This is DEBUG'); //Pipe to stdout with  color.
colorpint.trace('This is TRACE'); //Pipe to stdout with white color.
colorpint.error('This is ERROR'); //Pipe to stderr with red color.
colorpint.fatal('This is FATAL'); //Pipe to stderr with bgRed color.

Fore more detail, see API Guide of colorpint functions.

Install

$ npm install colorprint --save

Using via cli

CLI Usage

#!/bin/bash

colorpint info "This is INFO from CLI" # Pipe to stdout with green color.
colorpint debug "This is DEBUG from CLI" # Pipe to stdout with  color.
colorpint trace "This is TRACE from CLI" # Pipe to stdout with white color.
colorpint error "This is ERROR from CLI" # Pipe to stderr with red color.
colorpint fatal "This is FATAL from CLI" # Pipe to stderr with bgRed color.

Fore more detail, see API Guide of colorpint functions.

Install global for CLI usage.

$ npm install colorprint --g

Customizing

Customize the whole module.

var colorprint = require('colorprint');
colorprint.PREFIX='Yeah!';
colorprint.INFO_COLOR='blue';
colorprint.info('This will be blue with prefix.');

Create new context to customize.

var Colorprint = require('colorprint/lib/colorprint');
var colorprint = new Colorprint({
    PREFIX: '[Foo]',
    INFO_COLOR: 'blue'
});
colorprint.info('This will be blue with prefix.');


colorpint is using cli-color for coloring and you can see available colors here.

Website

Documents

Reports

License

This software is released under the MIT License.

About this project

Bitdeli Badge

Author

Donation

Support this project and others by okunishinishi via gratipay.

Support via Gratipay

Keywords

FAQs

Package last updated on 11 Jul 2015

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