mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
More stable way to preserve identifiers with scope identifiers traverser
This commit is contained in:
+5
-11
@@ -7,22 +7,16 @@ import { NO_ADDITIONAL_NODES_PRESET } from '../../src/options/presets/NoCustomNo
|
||||
|
||||
let obfuscatedCode: string = JavaScriptObfuscator.obfuscate(
|
||||
`
|
||||
function a (a, b) {
|
||||
|
||||
}
|
||||
|
||||
function b (b, c) {
|
||||
|
||||
}
|
||||
const b = function () {}
|
||||
|
||||
// javascript-obfuscator:disable
|
||||
function a () {}
|
||||
// javascript-obfuscator:enable
|
||||
`,
|
||||
{
|
||||
...NO_ADDITIONAL_NODES_PRESET,
|
||||
compact: false,
|
||||
identifierNamesGenerator: 'mangled',
|
||||
identifiersPrefix: 'a',
|
||||
transformObjectKeys: true,
|
||||
stringArray: true,
|
||||
stringArrayThreshold: 1,
|
||||
log: true
|
||||
}
|
||||
).getObfuscatedCode();
|
||||
|
||||
Reference in New Issue
Block a user