JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 24727
  • Score
    100M100P100Q135039F
  • License MIT

Prime colors for your console

Package Exports

  • manakin

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (manakin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

manakin

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

Wire-tailed manakin

The quickest and safest way to set colorful output for your Node.js console, without messing with the colors at all, 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 example.


minimum code ✔  no dependencies


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

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.success(val1, val2, ...); // green text output
console.info(val1, val2, ...); // cyan text output

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.success(val1, val2, ...); // green text output
con.info(val1, val2, ...); // cyan text output

In addition, you can easily do the following:

  • change brightness individually for each available method
  • create custom-color methods, with the same output formatting

For more details, see Full API.

Output example

Console output colors

License

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