mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Added mangled-shuffled identifier names generator
This commit is contained in:
+4
-10
@@ -1,5 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
import { IdentifierNamesGenerator } from '../../src/enums/generators/identifier-names-generators/IdentifierNamesGenerator';
|
||||
import { NO_ADDITIONAL_NODES_PRESET } from '../../src/options/presets/NoCustomNodes';
|
||||
|
||||
(function () {
|
||||
@@ -7,20 +8,13 @@ import { NO_ADDITIONAL_NODES_PRESET } from '../../src/options/presets/NoCustomNo
|
||||
|
||||
let obfuscatedCode: string = JavaScriptObfuscator.obfuscate(
|
||||
`
|
||||
function foo() {
|
||||
if (true) {
|
||||
if (false) {
|
||||
var bar = baz();
|
||||
}
|
||||
} else {
|
||||
var bark = hawk();
|
||||
}
|
||||
function foo (arg1, arg2, arg3) {
|
||||
console.log(arg1, arg2, arg3);
|
||||
}
|
||||
`,
|
||||
{
|
||||
...NO_ADDITIONAL_NODES_PRESET,
|
||||
compact: false,
|
||||
simplify: true
|
||||
identifierNamesGenerator: IdentifierNamesGenerator.MangledShuffledIdentifierNamesGenerator
|
||||
}
|
||||
).getObfuscatedCode();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user