console-stylizer
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

console-stylizer

Build Status

Library for console messages stylization.

Setup

  1. Install npm package in your project with:
npm install console-stylizer
  1. Import styliser function and enums with available console types and colors
import {stylize, ConsoleType, ColorsPalette} from 'console-stylizer';
  1. Run initializer with console type you want to stylise
// Set yellow font color and magenta bacroundg color to console.warn 
stylize(ConsoleType.Log, {fontColor: ColorsPalette.yellow, bgColor: ColorsPalette.magenta});

// Set green font color to console.warn 
stylize(ConsoleType.Error, {fontColor: ColorsPalette.green});

  1. Check that styles applied
console.log('test string');

console.warn({test: 'object'});

Readme

Keywords

Package Sidebar

Install

npm i console-stylizer

Weekly Downloads

1

Version

1.0.6

License

ISC

Unpacked Size

19.6 kB

Total Files

34

Last publish

Collaborators

  • gr8name