npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

console-log-in-color

v1.0.3

Published

A npm package to console.log or print in desired color

Downloads

9

Readme

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.