What it changes
Converts eligible arrow functions to function expressions while preserving their lexical captures. Arrows that usesuper or whose values escape stay
unchanged.
Before and after
Configuration
Run this transform by settingtransforms.arrowToFunction 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.