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 🙏

© 2026 – Pkg Stats / Ryan Hefner

clr-code

v1.2.2

Published

A custom CLI tool

Readme

Here’s a more attractive and decorated version of the README:

# 🌟 `crl-code` - Clean and Clear Your Code, Simplify Your Debugging 🌟

Welcome to **`crl-code`** — a powerful yet simple npm package designed to help developers **clean up** their JavaScript code by effortlessly removing unwanted `console.log()` statements and commented-out `//console.log()` lines. Whether you're preparing your code for production or just want a tidier, more efficient version, `crl-code` ensures that your codebase remains **clutter-free** and **optimized**!

---

## 🧹 Why Choose `crl-code`?

With **`crl-code`**, you can enjoy the following benefits:
- **💨 Automatic Cleanup**: Say goodbye to unnecessary `console.log()` and `//console.log()` clutter!
- **🔒 Preserve Important Logs**: Keep crucial logs intact by replacing `console.log()` with `console.warn()`, ensuring vital debug outputs remain visible.
- **📝 Non-Destructive**: Your original file remains untouched while a new, clean version is generated. **Safety First!**
- **🚀 Effortless Usage**: A simple CLI command makes cleaning your code a breeze.

---

## ✨ The Meaning Behind `clr-code`

Why **`clr-code`**? Let’s break it down:

- **CLR**: Short for **Clear** — representing the core mission of this tool: to **clear out** unnecessary `console.log()` statements from your code. We’re all about **streamlining** your codebase for a better, more professional look.
  
- **Code**: Refers to the JavaScript code that’s cleaned up, ensuring that your codebase stays neat, tidy, and **production-ready**.

**`clr-code`** is your one-stop tool for clearing out the clutter and making your code shine!

---

## ✨ Key Features

- **🧹 Effortless Cleanup**: Automatically removes all `console.log()` and `//console.log()` statements from your code, making it production-ready.
- **🔒 Keep Essential Logs**: Replace `console.log()` with `console.warn()` to preserve the logs you care about.
- **💡 Non-Destructive**: Your original file stays untouched while a new cleaned-up copy is generated, so you can always access your original code.
- **⚡ Simple CLI Command**: Run a single command to clean up your code — no complex configurations needed!

---

## 🚀 Installation

Install **`crl-code`** globally by running this command in your terminal:

```bash
npm install -g crl-code

🎯 Usage

Once installed, you can easily use crl-code via the command line to clean up your JavaScript files. Here’s how:

1. Remove All Console Logs (clr)

The default clr command removes all console.log() and //console.log() statements from your code. This is the default behavior of the package, ensuring that your code is clean and production-ready.

To run the command:

clr
  • What happens?: All unnecessary console.log() and //console.log() are removed, and a new clean copy of your file is created, leaving the original file unchanged.

2. Remove All Console Logs with clr auto

The command clr auto is essentially the same as clr. You can use either of the following commands to achieve the same result:

clr auto

or

clr

Both commands automatically clean your file by removing all debug logs and creating a new, clean version of your file.


3. Preserve Certain Console Logs

Need to keep some logs for debugging purposes? No problem! Simply replace console.log() with console.warn() where necessary, and crl-code will preserve them for you.

Example:

Before cleaning:

console.log("Debugging login flow...");  // Will be removed
console.warn("User data missing!"); // Will be preserved

After running clr auto:

console.warn("User data missing!"); // Preserved log

This ensures that essential debug logs remain intact while the unnecessary ones are removed.


⚙️ Options

  • auto: The clr auto command automatically removes all instances of console.log() and //console.log() from the given file and creates a clean copy.

This is the default behavior — so no worries if you just type clr!


💡 Why Use crl-code?

✅ Save Time, Automate the Process

Manually searching through your code to remove console.log() statements can be tedious and error-prone. With crl-code, you can automate this process and save time while preparing your code for production.

🚨 Keep Essential Logs

With crl-code, you don’t have to worry about losing important logs. Simply replace console.log() with console.warn() to preserve the logs you care about, and let the tool clean up the rest!


🛠️ Example

Here’s a quick walkthrough of how crl-code works:

1. Original file: Your app.js contains a mix of essential logs and unnecessary debug statements:

console.log("Debugging login flow...");
console.warn("User data missing!");
console.log("Fixing bugs...");

2. Run the command:

clr auto

3. New file: After running the command, crl-code will generate a new file with all unnecessary logs removed and important warnings kept intact:

console.warn("User data missing!");

Now your code is clean and ready for production deployment.


🔮 Future Updates

We’re always looking to improve crl-code! Some future updates include:

  • ✨ Custom Log Removal: Enable the removal of other types of console methods (e.g., console.error()).
  • 📂 Selective Log Removal: Allow users to specify specific files or directories to clean.
  • 🛠️ Integration with Build Tools: Seamlessly integrate with popular tools like Webpack or Gulp for automated log cleaning during your build process.

Stay tuned for these exciting features!


🤝 Contributing

We welcome contributions! If you have ideas for improvements or want to help out, feel free to:

  • Fork the repo
  • Create an issue
  • Submit a pull request

Your contributions are always welcome!


📜 License

crl-code is licensed under the MIT License. See the LICENSE file for more details.


By using crl-code, you streamline your development process and keep your codebase neat, professional, and production-ready. Say goodbye to cluttered debug logs and maintain a cleaner, more efficient codebase!



### Key Updates:
- **Decorated Sections**: Added emojis, headings, and sections for a more polished look.
- **Attractive Language**: Enhanced the descriptions to be more appealing and easier to read.
- **Future Updates Section**: Added exciting possibilities for upcoming features, making the project feel dynamic and evolving.