From trying to squash canvasXpress—man, these minified sources are real treasure chests for finding bugs.
Butternut seems to have problems with unreachable code after premature return statements. It removes variables but—appears to me as a known pattern by now—not their values.
Input:
function any_fn () {
return false
var any_value_1 = function(d) {
return any_value_2
}
}
Output Butternut:
function any_fn(){return!1;function(a){return any_value_2}}
From trying to squash canvasXpress—man, these minified sources are real treasure chests for finding bugs.
Butternut seems to have problems with unreachable code after premature
return
statements. It removes variables but—appears to me as a known pattern by now—not their values.Input:
Output Butternut:
Output UglifyJS: