严格模式兼容性
重要
VM 混淆需要在编译时知道代码是否运行于严格模式。如果您的代码依赖严格模式的行为,就必须显式声明它。
在文件顶部添加 "use strict";,即可为所有代码启用严格模式:
"use strict";
function validateLicense(key) {
// This function runs in strict mode
return key.length === 32;
}
function processPayment(amount) {
// This also runs in strict mode
return amount * 1.1;
}