New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

console-color-log

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

console-color-log

Colorize and style console logs in Node.js with ease using console-color-log.

latest
Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
6
Maintainers
1
Weekly downloads
 
Created
Source

Colorful Console Text

Add vibrant colors and styles to your console output with the Colorful Console Text library.

10.0.1 License: MIT

Description

The Colorful Console Text library provides utility functions for applying various text styles and colors to terminal/console output. With this library, you can easily enhance the visual appeal of your command-line applications or scripts, making them more engaging and user-friendly.

Please use chalk for complex requirements.

Installation

You can install the Colorful Console Text library via npm:

npm install console-color-log

Usage

To use the Colorful Text Utils library, follow these steps: 1.Import the required functions from the library:

const { green, red, bold, underline, bgYellow, cyan } = require('node-colorize-log');


Stylle

Apply styles and colors to your text:

console.log(green("This is a success message")); // Apply green color
console.log(red("This is an error message")); // Apply red color
console.log(bgBlue(blue("This text has a blue background"))); // Apply blue color with blue background
console.log(underline("This text is underlined")); // Apply underline style
console.log(bold("This text is bold")); // Apply bold style

Available Functions

The Colorful Text Utils library provides the following functions for applying colors and styles:

  • green, red, black, yellow, blue, magenta, cyan, white: Apply respective text colors.
  • bgGreen, bgRed, bgBlack, bgYellow, bgBlue, bgMagenta, bgCyan: Apply respective background colors.
  • bold: Apply bold style to text.
  • underline: Apply underline style to text.

Each function takes a single argument, which is the text you want to style or color.

Example

const { green, red, bold, underline, bgYellow, cyan } = require('console-color-log');

console.log(green("Success!"));
console.log(red("Error!"));
console.log(bold("Important message"));
console.log(underline("Underlined text"));
console.log(bgYellow(cyan("Text with yellow background and cyan color")));

Feel free to contribute to this project by submitting issues or pull requests on GitHub.

Keywords

colorize

FAQs

Package last updated on 13 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts