This is the input:
function local2functionA()
{
local2functionB('hello');
}
function local2functionB(text)
{
alert(text);
}
This is the output:
function local2functionA(){local2functionB("hello")}function local2functionB(a){alert(a)};
Any ideas where it hasn’t munged the function names?
Same outcome at http://www.shrinker.ch/
I think it’s because those functions are declared on the top-level, and thus visible to the “outside” so you cannot just change their name.
If you put the definition of local2functionB inside of local2functionA, it minifies nicely:
Note that the remaining top-level function also does not get renamed (while the “private” function gets inlined away completely).