Pack

Packs the output code into a single Function() call. Designed to escape strict mode constraints.

Option name: "pack"

Option values: true/false



Input / Output

This example showcases how Pack transforms the code. Try it out by changing the input code and see changes apply in real-time.

Input.js

Output.js


Bypass Strict Mode

The Pack option is designed to bypass strict mode constraints. This is achieved by wrapping the output code in a Function() call. This allows the code to be executed in a different context, where strict mode is not enforced.

Several obfuscation techniques require non-strict mode JavaScript. These include:

  • With Statement (Control Flow Flattening)
  • Eval scope access (Tamper Protection)

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