mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Fixed wrong names generation for the custom nodes
This commit is contained in:
+7
-4
@@ -7,16 +7,19 @@ import { NO_ADDITIONAL_NODES_PRESET } from '../../src/options/presets/NoCustomNo
|
||||
|
||||
let obfuscatedCode: string = JavaScriptObfuscator.obfuscate(
|
||||
`
|
||||
function foo () {
|
||||
const a = '123';
|
||||
const b = '234';
|
||||
const c = '345';
|
||||
|
||||
}
|
||||
console.log(a, b, c);
|
||||
`,
|
||||
{
|
||||
...NO_ADDITIONAL_NODES_PRESET,
|
||||
compact: false,
|
||||
identifierNamesGenerator: 'mangled',
|
||||
renameGlobals: true,
|
||||
reservedNames: ['a'],
|
||||
selfDefending: true,
|
||||
stringArray: true,
|
||||
stringArrayThreshold: 1,
|
||||
log: true
|
||||
}
|
||||
).getObfuscatedCode();
|
||||
|
||||
Reference in New Issue
Block a user