【文件属性】:
文件名称:rocambole-strip-alert
文件大小:3KB
文件格式:ZIP
更新时间:2021-06-22 00:51:39
JavaScript
rocambole-带警报
从 AST 中剥离警报语句
安装
npm install --save rocambole-strip-alert
例子
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; }
为了防止任何副作用, alert被替换为void 0而不是被删除。
执照
麻省理工学院 :copyright:
【文件预览】:
rocambole-strip-alert-master
----.jshintrc(298B)
----.gitignore(13B)
----package.json(790B)
----.travis.yml(70B)
----index.js(476B)
----test.js(1KB)
----readme.md(722B)
----.gitattributes(12B)
----.editorconfig(189B)