Socket
Book a DemoInstallSign in
Socket

rocambole-strip-console

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rocambole-strip-console

Strip console statements from a rocambole AST

latest
Source
npmnpm
Version
3.0.0
Version published
Maintainers
1
Created
Source

rocambole-strip-console Build Status

Strip console statements from a rocambole AST

Install

$ npm install rocambole-strip-console

Usage

const rocambole = require('rocambole');
const stripconsole = require('rocambole-strip-console');

rocambole.moonwalk('if (true) { console.log("foo"); }', node => {
	stripConsole(node);
}).toString();
//=> 'if (true) { void 0; }'

To prevent any side-effects, console.* is replaced with void 0 instead of being removed.

License

MIT © Sindre Sorhus

Keywords

rocambole

FAQs

Package last updated on 09 Nov 2018

Did you know?

Socket

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.

Install

Related posts