# colorize-console-log

> Colorize Console Log Module

Latest version **0.1.6** (published 2021-08-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install colorize-console-log
pnpm add colorize-console-log
yarn add colorize-console-log
bun add colorize-console-log
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2021-08-27 |
| First published | 2021-01-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=12 |
| Dependencies | 0 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Branko Stevanovic |
| Maintainers | brassta |
| Keywords | colorize, console, console.log |

## Links

- npm: https://www.npmjs.com/package/colorize-console-log
- Repository: https://github.com/brassta/ColorizeConsoleLog
- Homepage: https://github.com/brassta/ColorizeConsoleLog#readme
- Issues: https://github.com/brassta/ColorizeConsoleLog/issues
- npm.io page: https://npm.io/package/colorize-console-log

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 0.1.6 (latest) — 2021-08-27
- 0.1.5 — 2021-08-27
- 0.1.4 — 2021-08-27
- 0.1.3 — 2021-01-24
- 0.1.2 — 2021-01-24
- 0.1.1 — 2021-01-23
- 0.1.0 — 2021-01-23

## README

# Colorize Console Log

> Spice up console.log in dev-tools

This lib is intended to be used in IntelliJ like editors, mostly WebStorm & PHPStorm. In order to optimize usage of this library, you should do some extra steps, so I gonna try to explain in the "Getting Started" section below.

## Getting started

Of course, you should install this library into your project so the first step should be as usual:

```
npm install colorize-console-log
```

or if you like it:
```
npm i colorize-console-log
```
###Usage

Import all that you need/like from lib. All of them is listed below:
```
import { ConsoleOrange, ConsoleOrangeJS, ConsoleGray, ConsoleGrayJS } from 'colorize-console-log'
```
You should call them as:
```javascript
Console.log(...ConsoleOrange('this one is message', var1, var2, var3))
```
var1, var2, var3 are optional, use as you need. Or:
```javascript
Console.log(...ConsoleOrangeJS('message of course', varToBeShownAsJsonString))
```
now we need this (required) "varToBeShown..." variable. So library's method calls with JS on the very end of the name produce JSON.stringify output to console. You gonna know when you need them. Simple as that.
####Problem
Not so funny, isn't it? Pay attention to the spread operator in front of the function call, it is mandatory in order to get colorized console output actually. And yes, that is boring. I know, I know... The solution, at least in IntelliJ based editors should be:

- please open Settings/Preferences in your editor
- search for Live Templates
- choose JavaScript templates
- create a template for any of the listed methods
- give them some abbreviation, as you like
- paste next code in the Template text field
```javascript
console.log(...ConsoleOrange('$MESSAGE$', $VALUE$));$END$
```
or
```javascript
console.log(...ConsoleOrangeJS('$MESSAGE$', $VALUE$));$END$
```
or
```javascript
console.log(...ConsoleGray('$MESSAGE$', $VALUE$));$END$
```
or finaly
```javascript
console.log(...ConsoleGray('$MESSAGE$', $VALUE$));$END$
```

try to memorize your abbreviations and use them with joy.
In the Developer tools your brand new orange console.log masterpiece should look as:

![Screenshot](orange.jpg)

Nice one, isn't it?

Stay well. Thanks

---
_Source: https://npm.io/package/colorize-console-log · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
