
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
dev-console.macro
Advanced tools
This is a Babel macro to be used with babel-plugin-macros. By default, it'll remove all console.log
, console.warn
and console.error
calls from production
builds. Internally it uses babel-plugin-transform-remove-console.
npm install --save-dev dev-console.macro babel-plugin-macros
import console from 'dev-console.macro'
console.log('This is a', 'log message')
// Removed in production & staging builds
console.error('Nothing to see here')
// Removed in production builds
const w = console.warn.bind(console)
w("Being tricky won't help you")
// In production & staging, `w` will be defined as `function () {}`
First of all, you'll need to have "macros"
included as a Babel plugin. In some environments like react-scripts 2.0 this will already be done for you; for more details please refer to the babel-plugin-macros documentation.
If you'd like to customise this macro's behaviour in specific environments and/or exclude specific methods of console
from being removed, set the value of the remove-console
key in your babel-plugin-macros config. The default config corresponds to this:
{
"remove-console": {
"production": true,
"staging": { "exclude": ["error"] }
}
}
FAQs
A Babel macro that removes console prints in production
The npm package dev-console.macro receives a total of 25 weekly downloads. As such, dev-console.macro popularity was classified as not popular.
We found that dev-console.macro demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.