What it changes
Serializes the program and executes it through a generatedFunction
constructor.
Before and after
Configuration
Run this transform by settingtransforms.pack to true or an options object:
obfuscate.mjs
{ escapeStrict, skipGlobals, stringGeneratorMode } instead of true. escapeStrict removes strict mode from the generated function. skipGlobals defaults to true, which leaves standard globals as direct references. Set it to false to route every free name through accessors. An array replaces the default list. Every listed name must be visible inside a generated Function.
View the implementation
Open the TypeScript implementation on GitHub.
Read the behavior tests
Review behavior checks and cases this transform leaves alone.