Packs the output code into a single Function() call. Designed to escape strict mode constraints.
Option name: "pack"
Option values: true/false
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
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:
The provided code example will obfuscate the file input.js and write the output to a file named output.js.
Usage Example