mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Auto detection of prevailing kind of variables
This commit is contained in:
+4
-7
@@ -7,16 +7,13 @@ import { NO_ADDITIONAL_NODES_PRESET } from '../../src/options/presets/NoCustomNo
|
||||
|
||||
let obfuscatedCode: string = JavaScriptObfuscator.obfuscate(
|
||||
`
|
||||
(function () {
|
||||
var a = 'a', b = 'b';
|
||||
({[a]: a, [b]: b} = {a: 1, b: 2});
|
||||
|
||||
console.log(a, b);
|
||||
})();
|
||||
var foo = 'abcd'
|
||||
var bar = 'abcde'
|
||||
`,
|
||||
{
|
||||
...NO_ADDITIONAL_NODES_PRESET,
|
||||
transformObjectKeys: true
|
||||
stringArray: true,
|
||||
stringArrayThreshold: 1
|
||||
}
|
||||
).getObfuscatedCode();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user