Fixed order of the appended string array scope wrappers

This commit is contained in:
sanex
2020-09-12 14:16:19 +03:00
parent 09e89f8fe6
commit b152e7bd09
6 changed files with 84 additions and 7 deletions
+10 -2
View File
@@ -8,7 +8,15 @@ import { IdentifierNamesGenerator } from '../../src/enums/generators/identifier-
let obfuscatedCode: string = JavaScriptObfuscator.obfuscate(
`
[].map(v => 'vvv');
const foo = 'foo'
const bar = 'bar';
const baz = 'baz';
function test () {
const bark = 'bark'
const hawk = 'hawk';
const eagle = 'eagle';
}
`,
{
...NO_ADDITIONAL_NODES_PRESET,
@@ -19,7 +27,7 @@ import { IdentifierNamesGenerator } from '../../src/enums/generators/identifier-
transformObjectKeys: true,
stringArrayThreshold: 1,
stringArrayWrappersChainedCalls: false,
stringArrayWrappersCount: 1
stringArrayWrappersCount: 2
}
).getObfuscatedCode();