Skip to main content
Option: transforms.reorderFunctionDeclarations

What it changes

Moves hoisted function declarations to the end of their statement lists without changing their relative order.

Before and after

Configuration

Run this transform by setting transforms.reorderFunctionDeclarations 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.
Last modified on August 26, 2026