mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Additional improvements of variables preserving
This commit is contained in:
+14
-3
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user