@ivnatsr/color-logs
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Color-logs

Prettify Node.js console logs with some nice colors, easily.

Install

npm install @ivnatsr/color-logs

Basic usage

import { cl } from '@ivnatsr/color-logs'

console.log(cl.blue('Hello, world!'))

You can also pass a styles object to set font style and decorations:

console.log(cl.blue('Hello, world!', { font: 'bold', decoration: 'underline' }))

Combining font styles:

console.log(
  cl.blue('Hello, world!', {
    font: ['bold', 'italic'],
    decoration: 'underline'
  })
)

Supported styles:

Colors

  • blue
  • yellow
  • red
  • cyan
  • green
  • magenta
  • white
  • gray
  • brightRed
  • brightGreen
  • brightYellow
  • brightBlue
  • brightMagenta
  • brightCyan
  • brightWhite

Font

  • bold
  • italic

Decoration

  • underline
  • strikethrough

Package Sidebar

Install

npm i @ivnatsr/color-logs

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

8.9 kB

Total Files

6

Last publish

Collaborators

  • ivanatias