1.0.3 โ€ข Published 3 years ago

@catpic/console-highlighter v1.0.3

Weekly downloads
87
License
MIT
Repository
github
Last release
3 years ago

@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: "๐Ÿ”ฅ",
};

Demo

Themes may be customized using supported CSS properties.

const highlighter = new Highlighter({ 
  theme: 'unicorn'
  styles: { line: () => "display: block;" },
})

display: block

TODO

  • Expose combinators for building custom highlighters.
1.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

1.0.2

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.5

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago