@putout/plugin-convert-comparison-to-boolean
🐊Putout plugin adds ability to convert comparison to boolean
Last updated 4 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @putout/plugin-convert-comparison-to-boolean 
SYNC missed versions from official npm registry.

@putout/plugin-convert-comparison-to-boolean NPM version

Strict equality compares two values for equality. Neither value is implicitly converted to some other value before being compared. If the values have different types, the values are considered unequal.

(c) MDN

🐊Putout plugin adds ability to find and convert binary expression to boolean. Merged to @putout/plugin-conditions.

Install

npm i @putout/plugin-convert-comparison-to-boolean -D

Rule

{
    "rules": {
        "convert-comparison-to-boolean": "on"
    }
}

❌ Example of incorrect code

const t = 2 < 3;

✅ Example of correct code

const t = false;

License

MIT

Current Tags

  • 3.0.3                                ...           latest (4 years ago)

8 Versions

  • 3.0.3                                ...           4 years ago
  • 3.0.2                                ...           4 years ago
  • 3.0.1                                ...           4 years ago
  • 3.0.0                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.1.0                                ...           6 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Total 20
Today 0
This Week 0
This Month 18
Last Day 0
Last Week 1
Last Month 0
Dependencies (0)
None
Dependents (1)

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