Socket
Socket
Sign inDemoInstall

@putout/plugin-apply-nullish-coalescing

Package Overview
Dependencies
388
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @putout/plugin-apply-nullish-coalescing

putout plugin add ability to apply nullish coalescing operator (??)


Version published
Weekly downloads
304
increased by15.15%
Maintainers
1
Install size
3.55 kB
Created
Weekly downloads
 

Readme

Source

putout-plugin-apply-nullish-coalescing NPM version Dependency Status

putout plugin apply optional chaining.

Install

npm i @putout/plugin-apply-nullish-coalescing

Rule

{
    "rules": {
        "apply-nullish-coalescing": true
    }
}

❌ Incorrect code example

result = result || 'hello';
result = typeof result  === 'undefined' ? 'hello': result;

✅ Correct code Example

const result = result ?? 'hello';

License

MIT

Keywords

FAQs

Last updated on 09 Feb 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc