simple coloured console output
update travis config

refs

master
browse log

clone

read-only
https://git.sr.ht/~roryrjb/cconsole
read/write
git@git.sr.ht:~roryrjb/cconsole

cconsole Build Status

Zero-dependency simple coloured console output library.

Installation

Using npm:

$ npm install cconsole

API

cconsole(string)

Example

const cconsole = require('cconsole');

cconsole('{red(here is some red text)} and {blue(some blue)} text');

/*

    supports the following tags:

    {bold( .. text goes here .. )}
    {underline( .. text goes here .. )}
    {italic( .. text goes here .. )}
    {red( .. text goes here .. )}
    {blue( .. text goes here .. )}
    {green( .. text goes here .. )}
    {purple( .. text goes here .. )}
    {cyan( .. text goes here .. )}
    {yellow( .. text goes here .. )}
    {gray( .. text goes here .. )}
    {grey( .. text goes here .. )}
    {bg_red( .. text goes here .. )}
    {bg_blue( .. text goes here .. )}
    {bg_green( .. text goes here .. )}
    {bg_purple( .. text goes here .. )}
    {bg_cyan( .. text goes here .. )}
    {bg_yellow( .. text goes here .. )}
    {bg_gray( .. text goes here .. )}
    {bg_grey( .. text goes here .. )}
    {inverse( .. text goes here .. )}

*/