Socket
Socket
Sign inDemoInstall

manakin

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

manakin

Prime colors for your console


Version published
Weekly downloads
13K
decreased by-19.54%
Maintainers
1
Weekly downloads
 
Created
Source

manakin

Build Status Coverage Status Downloads Count Join the chat at https://gitter.im/vitaly-t/manakin

Wire-tailed manakin

The quickest and safest way to set default colorful output for your Node.js console, without messing with the colors, and to continue using the rich syntax and the output format supported by Node.js console methods:

 • with a list of parameters: console.log(obj1 [, obj2, ..., objN]);
 • with message formatting: console.log(msg [, subst1, ..., substN]);

Can be used either locally or globally (by overriding the console object), with automatic colors applied according to which method is used - see the screenshot below.


minimum code ✔  no dependencies


This library provides consistent output format for console methods after applying the colors, in contrast to generic color libraries that only apply colors to text.

Console output colors

Installing

$ npm install manakin --save

Usage

Using colors globally
require('manakin').global; // sets colors globally, for the `console` object

console.log(val1, val2, ...); // white/default text output
console.warn(val1, val2, ...); // yellow text output
console.error(val1, val2, ...); // red text output
console.info(val1, val2, ...); // cyan text output
console.success(val1, val2, ...); // green text output (custom method)
console.ok(val1, val2, ...); // green text output (custom method)
Using colors locally
var con = require('manakin').local; // use colors locally

con.log(val1, val2, ...); // white/default text output
con.warn(val1, val2, ...); // yellow text output
con.error(val1, val2, ...); // red text output
con.info(val1, val2, ...); // cyan text output
con.success(val1, val2, ...); // green text output (custom method)
con.ok(val1, val2, ...); // green text output (custom method)
Customization Features

You can easily do the following:

For more details and examples, see the full API and examples.

License

Copyright © 2018 Vitaly Tomilov; Released under the MIT license.

Keywords

FAQs

Package last updated on 19 Oct 2018

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