webcrack is able to successfully flatten if/else nesting in the else branch:
if(cond) {
console.log("branch 1")
} else {
if(cond2) {
console.log("branch 2")
} else {
console.log("branch 3")
}
}
becomes
if (cond) {
console.log("branch 1");
} else if (cond2) {
console.log("branch 2");
} else {
console.log("branch 3");
}
but the inverse is not unflattened:
if (!cond) {
if (cond2) {
console.log("branch 2");
} else {
console.log("branch 3");
}
} else {
console.log("branch 1");
}
webcrack is able to successfully flatten if/else nesting in the else branch:
becomes
but the inverse is not unflattened: