UglifyJS-old
UglifyJS-old copied to clipboard
"a?b():c()" should be "(a?b:c)()"
Here's an example: The origin:
function test(condition, func1, func2, arg1, arg2) {
if (condition) {
return func1(arg1, arg2);
} else {
return func2(arg1, arg2);
}
}
What I expect is:
function test(a,b,c,d,e){return(a?b:c)(d,e)}
But what the tool gives me is ((t,u)
is uneccessary repeated 2 times):
function main(n,i,r,t,u){return n?i(t,u):r(t,u)}
I guess uglify won't fix this.
Sorry, I can't really see what this should do. Please rebase onto master and send in a new PR.
(Edit: disregard that, this project is no longer maintained)