Correct obfuscation of object rest and spread properties

This commit is contained in:
sanex3339
2018-04-14 23:26:48 +03:00
parent aec12ce2d9
commit afe33db8fb
19 changed files with 243 additions and 59 deletions
+4 -5
View File
@@ -6,15 +6,14 @@ import { NO_ADDITIONAL_NODES_PRESET } from '../../src/options/presets/NoCustomNo
let obfuscatedCode: string = JavaScriptObfuscator.obfuscate(
`
(function () {
let a = 0;
let b = 0;
var test = {a, b};
})();
function func ({foo, ...rest}) {
return foo + rest;
}
`,
{
...NO_ADDITIONAL_NODES_PRESET,
compact: false,
transformObjectKeys: true
}
).getObfuscatedCode();