Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

simple-color-print

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-color-print

Print to the console in different colors and fully print objects

latest
Source
npmnpm
Version
1.0.6
Version published
Maintainers
1
Created
Source

simple-color-print

4 functions to print out different colors to the console. Use this for console printing in NodeJS. It prints out the full object so you don't end up with "[Object object]". Also includes TypeScript declaration file so it works with "no-implicity-any" in tsconfig.json. No configuration required.

created by Sean Maxwell June 25, 2018.

  • cerr('hello world') <-- prints red

  • cinfo('hello world') <-- prints green

  • cwarn('hello world') <-- prints yellow

  • cimp('hello world') <-- prints blue and underlined

TypeScript example:

import { cerr, cinfo, cwarn, cimp } from 'simple-color-print';

if (err) {
    cerr(err);
} else if (info) {
    cinfo(info);
}
  • JavaScript example:
let scp = require('simple-color-print');

if (warning) {
    scp.cwarn(warn);
} else if (info) {
    scp.cimp('All is well!');
}

Keywords

simple

FAQs

Package last updated on 26 Jan 2019

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