npm.io
1.0.2 • Published 6 years ago

@mirania/console-colors

Licence
MIT
Version
1.0.2
Deps
0
Size
13 kB
Vulns
0
Weekly
0

Console-colors

Improve the JS console's capabilities with pretty colors.

npm i @mirania/console-colors

The module inherits all functionality from the native console, so you can safely replace it as such:

const console = require("@mirania/console-colors");

Features

  • methods for coloring a line of text: bold(), black(), red(), green(), gold(), blue(), magenta(), cyan(), white(), grey(), gray(), ruby(), leaf(), yellow(), ocean(), pink(), sky(), light()

  • method to create a string with the intended colors: format(), which accepts a style. A style is an object that can have 2 keys:

    • text, which may be any of the colors mentioned above

    • bg or background, any of the colors above except bold

Keywords