What it changes
Rewrites eligible conditional expressions asif statements, using a
temporary when their value is needed.
Before and after
Configuration
Run this transform by settingtransforms.ternaryToIf 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.