Added ignoring of all object members previous to SpreadElement when transformObjectKeys option is enabled

Fixed https://github.com/javascript-obfuscator/javascript-obfuscator/issues/797
This commit is contained in:
sanex
2020-11-03 11:15:19 +03:00
parent 867c125dab
commit e8517bf770
14 changed files with 252 additions and 112 deletions
+9 -10
View File
@@ -7,16 +7,15 @@ import { NO_ADDITIONAL_NODES_PRESET } from '../../src/options/presets/NoCustomNo
let obfuscatedCode: string = JavaScriptObfuscator.obfuscate(
`
function foo () {
const {
qq,
qqq,
} = object;
const foo = {
prop: 1
};
}
const foo = {
baz: 1
};
const bar = {
baz: 2,
bark: 3,
...foo,
};
console.log(bar);
`,
{
...NO_ADDITIONAL_NODES_PRESET,