// input
function foo () {
function bar () {
console.log(42);
}
bar();
}
// output
function foo(){function a(){console.log(42)}a()}
// better output
function foo(){console.log(42)}
I think this basically applies to any function that is only called once. The trick is to ensure that the scopes are merged for the purposes of mangling. Might get awkward when arguments are involved.
I think this basically applies to any function that is only called once. The trick is to ensure that the scopes are merged for the purposes of mangling. Might get awkward when arguments are involved.