1.0.7 • Published 10 months ago

clearconsolelogs v1.0.7

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

clearconsolelogs

clearconsolelogs is a simple Node.js command-line tool that automatically removes all console.log() statements from JavaScript (.js, .jsx) and TypeScript (.ts, .tsx) files in the current directory. This tool is perfect for cleaning up your logs before pushing your code to production.

Features

  • Removes all console.log() statements from .js, .jsx, .ts, and .tsx files.
  • Easy to install globally as a command-line tool.
  • Can be run from any directory to clean up the code.

Installation

npm install -g clearconsolelogs

Usage

To remove console.log() statements from JavaScript and TypeScript files in the current directory, navigate to the desired directory in your terminal and run:

clear-logs

This will scan all the .js, .jsx, .ts, and .tsx files in the current directory and remove any console.log() statements it finds.

Usage

Before Running clearconsolelogs Suppose you have a test.js file with the following content:

function greet() {
  console.log("Hello, World!");
  const name = "John";
  console.log("Name is:", name);
  return `Hello, ${name}`;
}

After Running clearconsolelogs After running clearconsolelogs in the directory containing test.js, the file will be updated to:

function greet() {
  const name = "John";
  return `Hello, ${name}`;
}

All console.log() statements have been removed.

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.3

1 year ago

1.0.0

2 years ago