Determines if variables should be renamed.
Option name: "renameVariables"
Option values: true/false/Function
This example showcases how Rename Variables transforms the code. Try it out by changing the input code and see changes apply in real-time.
Input.js
Output.js
The comment syntax /* @js-confuser-var */ "varName" provides a method to access variable mappings. This is especially useful for eval() scenarios where you want preserve the mapping.
Code
Even if Rename Variables is disabled, the comment /* @js-confuser-var */ will still be removed. (The original name will be returned as a string)
The prefix __NO_JS_CONFUSER_RENAME__ disables renaming a certain variable. This can be useful for debugging the obfuscator.
Code
Control which variable names are changed. Returns a boolean.
Parameter | Type | Description |
---|---|---|
varName | string | The variable name proposed to be changed. |
Options.js
The provided code example will obfuscate the file input.js and write the output to a file named output.js.
Usage Example