1.1.0 • Published 2 years ago

jm-console v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

About

An easy-to-use colorized console for node.js. Log colorized and styled texts on the console!

screenshot

Installation

npm i jm-console

Usage

const { console, colors } = require('jm-console');

console.log(message, styles);

console.success(message, styles);
console.successBG(message, styles);

console.info(message, styles);
console.infoBG(message, styles);

console.warning(message, styles);
console.warningBG(message, styles);

console.error(message, styles);
console.errorBG(message, styles);

console.custom(message, color, styles);

Examples

console.log('Hello World');

console.log('Hello World', { bold: true });

console.success('Hello World', { bold: true, italic: true });

console.custom('Hello World', colors.Blue, { bold: true });

Styles Object

PropertyTypeDescription
boldBooleanMakes the text bold
italicBooleanMakes the text italic
underscoreBooleanAdds underscore to the text
lineThroughBooleanAdds a line through to the text

Colors

Black | Red | Green | Yellow | Blue | Magenta | Cyan | White | Gray | RedLight | GreenLight | YellowLight | BlueLight | MagentaLight | CyanLight | WhiteLight | BgBlack | BgRed | BgGreen | BgYellow | BgBlue | BgMagenta | BgCyan | BgWhite | BgGray | BgRedLight | BgGreenLight | BgYellowLight | BgBlueLight | BgMagentaLight | BgCyanLight | BgWhiteLight |