Additional improvements of variables preserving

This commit is contained in:
sanex3339
2020-02-09 14:26:34 +03:00
parent 4e716ed0d0
commit 78722782de
21 changed files with 176 additions and 44 deletions
+14 -3
View File
@@ -7,13 +7,24 @@ import { NO_ADDITIONAL_NODES_PRESET } from '../../src/options/presets/NoCustomNo
let obfuscatedCode: string = JavaScriptObfuscator.obfuscate(
`
const sdasdas = '123';
const a = {x: 'abc'};
function foo (b, c) {
return a;
function bar () {
var a = 0;
return a;
}
}
`,
{
...NO_ADDITIONAL_NODES_PRESET,
compact: false,
identifierNamesGenerator: 'dictionary',
identifiersDictionary: ['a', 'b', 'c', 'd', 'e'],
// identifierNamesGenerator: 'dictionary',
// identifiersDictionary: ['a', 'b', 'c', 'd', 'e'],
identifierNamesGenerator: 'mangled',
transformObjectKeys: true,
stringArray: true,
stringArrayThreshold: 1
}