文件名称:ieify:采用有效的代码,并使其在语法有挑战的环境中更有效
文件大小:118KB
文件格式:ZIP
更新时间:2024-06-20 00:40:12
JavaScript
即化 如果您在浏览器或节点中执行类似操作: var x = { } ; x . case = 'things' ; 它会起作用。 然而,在许多版本的 Internet Explorer 中,它会出错,出现Unexpected identifier ,这显然是因为您使用了保留关键字。 ieify是一个模块,它接受完全有效的代码,并使其在语法上受挑战的环境(例如Internet Explorer)中更加有效。 用法: npm install ieify var ieify = require ( 'ieify' ) ; var someCode = "var x = {class:'foo'}; x.switch = 'bar';" ieify ( someCode ) // -> var x = {"class":'foo'}; x["switch"] = 'bar';
【文件预览】:
ieify-master
----.gitignore(12B)
----package.json(732B)
----cli.js(98B)
----LICENSE(1KB)
----index.js(2KB)
----README.md(645B)
----test()
--------index.browser.js(555KB)
--------index.js(1KB)
--------index.html(40B)