Skip to main content
  • Option name: "preserveFunctionLength"
  • Option values: true/false

Input / Output

This example showcases how Preserve Function Length transforms the code. Try it out by changing the input code and see changes apply in real-time.
Input.js

Preserving Function Length

The property function.length returns the number of arguments expected by the function. This property is read-only and cannot be changed. The obfuscator will most likely change the function length property. This option preserves the original function length property by adding a subsequent assignment to mock the original length.

Why This Matters

Some libraries and frameworks rely on the function.length property. If the property is changed, it can break the functionality of the library or framework.

Usage Example

The provided code example will obfuscate the file input.js and write the output to a file named output.js.
Usage Example

Enabled In