rocambole-strip-alert

1.0.0 • Public • Published

rocambole-strip-alert Build Status

Strip alert statements from a rocambole AST

Install

npm install --save rocambole-strip-alert

Example

var rocambole = require('rocambole');
var stripAlert = require('rocambole-strip-alert');
 
rocambole.moonwalk('if (true) { alert("foo"); }', function (node) {
    stripAlert(node);
}).toString();
//=> if (true) { void 0; }

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

License

MIT © Patrick Williams

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    26,051
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    26,051
  • 0.1.1
    23
  • 0.1.0
    1

Package Sidebar

Install

npm i rocambole-strip-alert

Weekly Downloads

7,709

Version

1.0.0

License

MIT

Last publish

Collaborators

  • pwmckenna