Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@putout/plugin-merge-if-statements

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@putout/plugin-merge-if-statements

🐊Putout plugin adds ability to merge if-statements

  • 3.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@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

Keywords

FAQs

Package last updated on 14 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc