$ npm install @putout/plugin-merge-if-statements
The
if
statement executes a statementif
a 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
© 2010 - cnpmjs.org x YWFE | Home | YWFE