🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@putout/plugin-simplify-boolean-return

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@putout/plugin-simplify-boolean-return

🐊Putout plugin adds ability to simplify boolean return

2.0.2
latest
Source
npm
Version published
Weekly downloads
1.6K
-16.8%
Maintainers
1
Weekly downloads
 
Created
Source

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

🐊Putout plugin adds ability to simplify boolean return. Merged with @putout/plugin-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

putout

FAQs

Package last updated on 30 Jan 2025

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