Move Nested Function

  • MoveNested
  • Enterprise

Extracts anonymous (inline) functions out of their enclosing statements and replaces them with named references.

Before:

a.onclick(function(){});
b={onclick:function(){}}

After:

a.onclick(c);
b={onclick:d}

When combined with Flat Transform, the extracted function bodies are relocated to random positions in the output, further obscuring the code flow.