rocambole-strip-console

Strip console statements from a rocambole AST

npm install rocambole-strip-console
29 downloads in the last day
201 downloads in the last week
1 035 downloads in the last month

rocambole-strip-console Build Status

Strip console statements from a rocambole AST

Install

npm install --save rocambole-strip-console

Example

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

rocambole.moonwalk('if (true) { console.log("foo"); }', function (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

npm loves you