@putout/plugin-remove-double-negations
putout plugin adds ability to remove double negations
Last updated 5 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @putout/plugin-remove-double-negations 
SYNC missed versions from official npm registry.

@putout/plugin-remove-double-negations NPM version

To explicitly convert its return value (or any expression in general) to the corresponding boolean value can be used a double NOT operator (!!).

(c) MDN

????Putout plugin adds ability to remove double negations from conditionals. Merged to remove-unused-type-convertion

Install

npm i @putout/plugin-remove-double-negations

Rule

{
    "rules": {
        "remove-double-negations": "off"
    }
}

❌ Example of incorrect code

if (!!a) {
    console.log('hi');
}

✅ Example of correct code

if (a) {
    console.log('hi');
}

License

MIT

Current Tags

  • 4.0.1                                ...           latest (4 years ago)

7 Versions

  • 4.0.1                                ...           4 years ago
  • 4.0.0                                ...           4 years ago
  • 3.1.0                                ...           5 years ago
  • 3.0.0                                ...           5 years ago
  • 2.0.0                                ...           6 years ago
  • 1.0.1                                ...           7 years ago
  • 1.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (8)

Copyright 2013 - present © cnpmjs.org | Home |