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 🙏

© 2025 – Pkg Stats / Ryan Hefner

beautiful-logger

v1.1.0

Published

A beautiful CLI logger with colors and log counting and deleteion .

Readme

🌈 beautiful-logger

A beautifully styled logger utility for both client-side (browser) and server-side (Node.js) applications. Plus, a built-in CLI tool to manage your logs across a project — list, remove, or comment them all in one go!


📦 Installation

npm install beautiful-logger

yarn add beautiful-logger

Two classes available to import

1. ClientLogger

Helpful for client side app logging like React and Vue Apps
Multiple functions provided to show log of different colors
User can pass an extra argument of true as the second parameter to show timestamp of the log

2. ServerLogger

Helpful for server side apps like Node.js or Express Apps even Next.js Server Components
Multiple functions provided to show log of different colors
User can pass an extra argument of true as the second parameter to show timestamp of the log
Has separate functions to show coloured output and coloured background respectively

🚀 Features

✅ Two powerful logger classes: ClientLogger – for styled logs in the browser (JS/TS) ServerLogger – for colorful logs in Node.js terminal 🕹️ Built-in CLI: Count all console.log usages Remove or comment all logs (including beautiful-logger imports) 🕒 Optional timestamps with formatting 🎨 Supports custom RGB colors 🌗 Inverted styles for contrast

📖 Usage

1. ClientLogger (For browser)

import { ClientLogger } from "beautiful-logger";

ClientLogger.info("Info log");
ClientLogger.warn("Warning message", { timestamp: true });
ClientLogger.error("Error happened", { inverted: true });
ClientLogger.success("All good!", { clear: true });
ClientLogger.rgb("Custom RGB log", { r: 100, g: 200, b: 100 });
ClientLogger.rgbInverted("Inverted RGB", { r: 200, g: 50, b: 100 });

🛠️ Options

type options = {
  label?: string,
  timestamp?: boolean,
  timeFormat?: "timeOnly" | "dateOnly" | "12h",
  inverted?: boolean,
  clear?: boolean,
  r?: number,
  g?: number,
  b?: number,
};

2. ServerLogger (For Node.js)

import { ServerLogger } from "beautiful-logger";

ServerLogger.info("Info log");
ServerLogger.success("Success log", true); // with timestamp
ServerLogger.warn("Warning!", true);
ServerLogger.error("Something went wrong");

ServerLogger.infoBg("Info with background", true);
ServerLogger.successBg("Success background", true);

💻 CLI Commands

The beautiful-logger CLI gives you the power to analyze and clean up logs across your project.

🧾 Count all logs npx beautiful-logger count

Prints the number of all console.log and beautiful-logger logs across your project.

🧹 Remove all logs

npx beautiful-logger remove

Deletes all console.log, ClientLogger., ServerLogger._ calls and their import statements._

💬 Comment all logs

npx beautiful-logger comment

Comments all logs and beautiful-logger imports instead of deleting.

🌐 Works With

✅ JavaScript & TypeScript ✅ Node.js ✅ Browser (via bundlers like Vite, Webpack, etc.) ✅ CLI (cross-platform)

🧩 Future Plans

Add support for custom themes Enable filtering specific file types via CLI

MIT ©

🙌 Contributing

PRs are welcome! Feel free to open issues or suggestions for improvement.