Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
console-silencer
Advanced tools
silences console.log/error output except for those originating from testrunner
This zero-dependencies module allows you to silence console.log and console.error from the code that is currently tested without silencing the logs of your testrunner. Module is intended for use in Node JS v8.x enviroment.
To install please run
npm i -D console-silencer
This module exports a function that accepts one argument - a String with the word pattern of your testrunner logs (usually the name of the test running tool. Inside the first file executed in your test suite you need to require this module
require('console-silencer')('mocha');
or, if it seems more convinient to you:
const silencer = require('console-silencer');
silencer('mocha');
The function shall replace console.log and console.error functions with the one that checks its stack and if this stack includes an argument pattern as a substring - makes log into console, otherwise it does nothing.
FAQs
silences console.log/error output except for those originating from testrunner
The npm package console-silencer receives a total of 0 weekly downloads. As such, console-silencer popularity was classified as not popular.
We found that console-silencer 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.