What it changes
Rewrites eligible function declarations in scripts and function bodies asvar-initialized function expressions. Declarations stay unchanged when
moving initialization to their statement position could alter execution.
Before and after
Configuration
Run this transform by settingtransforms.functionDeclarationToExpression to true:
obfuscate.mjs
View the implementation
Open the TypeScript implementation on GitHub.
Read the behavior tests
Review behavior checks and cases this transform leaves alone.