@putout/plugin-convert-comparison-to-boolean
🐊Putout plugin adds ability to convert comparison to boolean
Last updated 3 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (3 years ago)

8 Versions

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

Copyright 2013 - present © cnpmjs.org | Home |