@dannyxcii/console-logger
v0.2.2
Published
A console logging package for easily creating coloured messages.
Downloads
22
Readme
Console Logger
A console wrapper to easily output coloured messages.
Installation
npm install @dannyxcii/console-logger
Usage
import { ConsoleColour, ConsoleLogger } from '@dannyxcii/console-logger';
// console.log()'s a blue message
ConsoleLogger.logInfo(<string>message);
// console.log()'s a green message
ConsoleLogger.logSuccess(<string>message);
// console.warn()'s a yellow message
ConsoleLogger.logWarning(<string>message);
// console.error()'s a red message
ConsoleLogger.logError(<string>message);
// Any colour/style combination you like from the ConsoleColour enum
ConsoleLogger.log(<string>message, <Array<string>>colours);
// Example .log() usage
ConsoleLogger.log('My message', [
ConsoleColour.FgCyan,
ConsoleColour.BgMagenta,
ConsoleColour.Blink
]);