https://github.com/lucasgdb/beautify.log
:rocket: A Node.js lib to beautify the console.log from JavaScript with colors, making it easier and useful. :heart:
https://github.com/lucasgdb/beautify.log
colors console-log nodejs terminal typescript
Last synced: 3 months ago
JSON representation
:rocket: A Node.js lib to beautify the console.log from JavaScript with colors, making it easier and useful. :heart:
- Host: GitHub
- URL: https://github.com/lucasgdb/beautify.log
- Owner: lucasgdb
- License: mit
- Created: 2020-01-19T14:48:04.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-07T15:41:11.000Z (over 4 years ago)
- Last Synced: 2025-08-21T00:49:51.254Z (11 months ago)
- Topics: colors, console-log, nodejs, terminal, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/beautify.log
- Size: 493 KB
- Stars: 49
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Beautify log




## Description
A Node.js lib to beautify the console.log from JavaScript with colors, making it easy and useful.
## How to use
- type `yarn add beautify.log` or `npm i beautify.log -s`
## Documentation
All parameters are case-insensitive.
| Parameter | Result |
| ------------ | ---------------------------------------- |
| {reset} | Resets to the default color |
| {bright} | Shines the text |
| {dim} | Dims the tex |
| {underscore} | Puts an underline |
| {blink} | Blinks the text |
| {reverse} | Reverses background and foreground color |
| {hidden} | Hides the text |
| {fgBlack} | Foreground's color |
| {fgRed} | Foreground's color |
| {fgGreen} | Foreground's color |
| {fgYellow} | Foreground's color |
| {fgBlue} | Foreground's color |
| {fgMagenta} | Foreground's color |
| {fgCyan} | Foreground's color |
| {fgWhite} | Foreground's color |
| {bgBlack} | Background's color |
| {bgRed} | Background's color |
| {bgGreen} | Background's color |
| {bgYellow} | Background's color |
| {bgBlue} | Background's color |
| {bgMagenta} | Background's color |
| {bgCyan} | Background's color |
| {bgWhite} | Background's color |
## Usage
```js
const beautify = require('beautify.log').default; // or import beautify from 'beautify.log';
beautify.log('{fgRed}Hello, {fgGreen}world!');
beautify.log('{bgWhite}{fgRed}Hello, {bgRed}{fgGreen}world!');
beautify.log('{fgGreen}Hello, {fgRed}world!');
beautify.log('{dim}{fgRed}Hello, {fgGreen}world!');
beautify.log('{underscore}{fgRed}Hello, {fgGreen}world!');
beautify.log('{bright}{fgRed}Hello, {fgGreen}world!');
beautify.log(
'{bright}{fgYellow}Lorem ipsum dolor {fgBlue}sit amet consectetur {fgCyan}adipisicing elit.'
);
beautify.log(
'{fgYellow}Lorem ipsum dolor {reset}{bgRed}sit amet consectetur{reset} {fgCyan}adipisicing elit.'
);
beautify.log(
'{reverse}{fgYellow}Lorem ipsum dolor{reset} {reverse}{bgRed}sit amet consectetur{reset} {reverse}{fgCyan}adipisicing elit.'
);
```
## Output

## Author
| [
@lucasgdb](https://github.com/lucasgdb) |
| :----------------------------------------------------------------------------------------------------------------------------: |