@putout/plugin-merge-if-statements
🐊Putout plugin adds ability to merge if-statements
Last updated a year ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @putout/plugin-merge-if-statements 
SYNC missed versions from official npm registry.

@putout/plugin-merge-if-statements NPM version

The if statement executes a statement if a specified condition is truthy.

(c) MDN

🐊Putout plugin adds ability to merge if statements. Merged to @putout/plugin-conditions.

Install

npm i @putout/plugin-merge-if-statements

Rule

{
    "rules": {
        "merge-if-statements": "on"
    }
}

❌ Example of incorrect code

if (a > b) {
    if (b < c) {
        console.log('hello');
    }
}

✅ Example of correct code

if (a > b && b < c) {
    console.log('hello');
}

License

MIT

Current Tags

  • 3.1.1                                ...           latest (a year ago)

7 Versions

  • 3.1.1                                ...           a year ago
  • 3.1.0                                ...           4 years ago
  • 3.0.0                                ...           5 years ago
  • 2.0.1                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (8)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE