Socket
Socket
Sign inDemoInstall

@putout/plugin-simplify-boolean-return

Package Overview
Dependencies
389
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @putout/plugin-simplify-boolean-return

🐊Putout plugin adds ability to simplify boolean return


Version published
Weekly downloads
3.3K
increased by9.33%
Maintainers
1
Install size
4.38 kB
Created
Weekly downloads
 

Readme

Source

@putout/plugin-simplify-boolean-return NPM version

🐊Putout plugin adds ability to simplify boolean return.

Install

npm i @putout/plugin-simplify-boolean-return -D

Rule

{
    "rules": {
        "simplify-boolean-return": "on"
    }
}

Check out in 🐊Putout Editor.

❌ Example of incorrect code

function isA(a, b) {
    if (a.length === b.length)
        return true;
    
    return false;
}

✅ Example of correct code

function isA(a, b) {
    return a.length !== b.length;
}

License

MIT

Keywords

FAQs

Last updated on 14 Jun 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc