console-hue
This tiny module is basically an improved version of the native console.log
, adding colour support for different type of messages and a "Stringify" functionality by default for Objects
and Arrays
.
Install
You can install with [npm]:
$ npm install --save console-hue
Usage
When you import the module, the following methods will be exposed:
const consoleh = error: Function success: Function warn: Function debug: Function log: Function blue: Function pink: Function red: Function green: Function yellow: Function cyan: Function
And then you can use consoleh
with any of the previous methods to get a colourful reply in the console:
> const consoleh = // Green outputconsoleh// Red outputconsoleh// Yellow outputconsoleh
As described before the module will attempt to "Stringify" the Arrays and Objects passed in the message sent to the module. You can override this behaviour by passing true
as the second parameter:
> const consoleh = // With default Stringigy behaviourconsoleh{}// Getting the original msg without Stringigyconsolehobject Object
License
Copyright © 2019, Juan Convers. Released under the MIT License.