JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 16482
  • Score
    100M100P100Q167778F
  • License MIT

putout plugin adds ability to simplify ternary operator

Package Exports

  • @putout/plugin-simplify-ternary

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@putout/plugin-simplify-ternary) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

putout-plugin-simplify-ternary NPM version Dependency Status

putout plugin adds ability to convert arguments to rest.

Install

npm i @putout/plugin-simplify-ternary -D

Rule

{
    "rules": {
        "simplify-ternary": true
    }
}

❌ Incorrect code example

module.exports = fs.copyFileSync ? fs.copyFileSync : copyFileSync;

✅ Correct code Example

module.exports = fs.copyFileSync || copyFileSync;

License

MIT