1.0.3 โข Published 3 years ago
@catpic/console-highlighter v1.0.3
@catpic/console-highlighter
Highlight console log messages with style.
Features
- themeable
- customizable
- automatic highlighting (variables used in template strings will be highlighted)
How to
yarn add @catpic/console-highlighter
const highlighter = new Highlighter({theme: 'dracula'})
highlighter.highlight.yellow`${count} messages sent.`
The listed emojis may be used in log message like so: this message is :fire:
export const emojis = {
poop: "๐ฉ",
happy: "๐",
unicorn: "๐ฆ",
rainbow: "๐",
party: "๐",
heart: "โค๏ธ",
bomb: "๐ฃ",
bang: "๐ฅ",
dynamite: "๐งจ",
fire: "๐ฅ",
};
Themes may be customized using supported CSS properties.
const highlighter = new Highlighter({
theme: 'unicorn'
styles: { line: () => "display: block;" },
})
TODO
- Expose combinators for building custom highlighters.