jungpaeng / lovely-console

colorful console

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

colorful console

License:MIT License


Languages

Language:TypeScript 50.3%Language:JavaScript 49.7%