定向混淆特定函数
Recommended
为获得最佳性能,请使用 vmTargetFunctionsMode 仅对最敏感的代码进行 VM 混淆。
设置 vmTargetFunctionsMode: 'comment',即可只对带有特殊注释标记的函数进行 VM 混淆。可在 任意嵌套层级 上生效。
function regularFunction() {
return 'not virtualized';
}
/* javascript-obfuscator:vm */
function sensitiveFunction() {
return 'this will be VM-protected';
}
class MyClass {
/* javascript-obfuscator:vm */
sensitiveMethod() {
return 'method will be VM-protected';
}
}