$ cnpm install @putout/plugin-merge-if-statements
The
ifstatement executes a statementifa specified condition is truthy.(c) MDN
????Putout plugin adds ability to merge if statements. Merged to @putout/plugin-conditions.
npm i @putout/plugin-merge-if-statements
{
"rules": {
"merge-if-statements": "on"
}
}
if (a > b) {
if (b < c) {
console.log('hello');
}
}
if (a > b && b < c) {
console.log('hello');
}
MIT
Copyright 2013 - present © cnpmjs.org | Home |