lovely-console

lovely console

Usage no npm install needed!

<script type="module">
  import lovelyConsole from 'https://cdn.skypack.dev/lovely-console';
</script>

README

lovely-console Logo

⚙ Installation

npm

$ npm install --save lovely-console

yarn

$ yarn add lovely-console

🏃 Quick Start

lovelyConsole(
  [
    { msg: 'text' },
    { msg: 'text2', style: 'background: tomato; font-size: 20px;' },
  ],
);
const styledConsole = makeStyledConsole({
  background: 'tomato',
  'font-size': '20px',
});

styledConsole('text');

🍳 Recipes

Default arguments

function lovelyConsole(messages: Message[], key?: keyof Console); // default key is 'log'

console function

lovelyConsole([...],'log'); // console.log, default
lovelyConsole([...],'error'); // console.error
lovelyConsole([...],'debug'); // console.debug
...

support styles

  • background and its longhand equivalents.
  • border and its longhand equivalents
  • border-radius
  • box-decoration-break
  • box-shadow
  • clear and float
  • color
  • cursor
  • display
  • font and its longhand equivalents
  • line-height
  • margin
  • outline and its longhand equivalents
  • padding
  • text-* properties such as text-transform
  • white-space
  • word-spacing and word-break
  • writing-mode

🍰 Contributing

Keep it simple. Keep it minimal.

📜 License

This project is licensed under the MIT License