Giter VIP home page Giter VIP logo

console-log-in-color's Introduction

console-log-in-color

console-log-in-color is a simple and lightweight npm package that allows you to add color to your console log messages in Node.js. It enhances the visibility and readability of your log messages by applying various colors.

Add a splash of colors to your Node.js console logs and outputs

This lightweight npm package empowers you to effortlessly enhance your console logs with a variety of colors.

Features

  • Simple and Intuitive: The changePrintColor function provides a clear way to customize your console output.
  • Wide Range of Colors: Choose from 8 distinct colors (Black, Red, Green, Yellow, Blue, Magenta, Cyan, White) to highlight different messages.
  • Cross-Platform Compatibility: Works seamlessly on various terminal environments that support ANSI escape sequences.

Installation

To install the package, run the following command:

npm install console-log-in-color

Usage

  1. Import the function
const { changePrintColor } = require('console-log-in-color');
  1. Customize your console output
changePrintColor("Green", "Success! The process completed successfully.");
changePrintColor("Red", "Error: An unexpected issue occurred.");
changePrintColor("Yellow", "Warning: Potential issue detected.");
changePrintColor("Blue", "Information: This is just a regular message.");
// ... and so on for other colors
  1. Executing the Code
node somefile.js

some file should be the name of the file you are using this package.

Available Colors

  1. Black
  2. Red
  3. Green
  4. Yellow
  5. Blue
  6. Magenta
  7. Cyan
  8. White

Compatibility

This package works in Node.js environments on terminals that support ANSI escape sequences.

Contributing

We appreciate contributions from the community. Feel free to fork the repository and submit pull requests to enhance this package!

License

This project is distributed under the Apache 2.0 License.

console-log-in-color's People

Contributors

freescetic avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.