Socket
Socket
Sign inDemoInstall

@babel/plugin-syntax-nullish-coalescing-operator

Package Overview
Dependencies
54
Maintainers
6
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @babel/plugin-syntax-nullish-coalescing-operator

Allow parsing of the nullish-coalescing operator


Version published
Weekly downloads
26M
Maintainers
6
Install size
11.4 kB
Created
Weekly downloads
 

Package description

What is @babel/plugin-syntax-nullish-coalescing-operator?

The @babel/plugin-syntax-nullish-coalescing-operator package allows Babel to parse code that uses the nullish coalescing operator (??). This operator is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand. This package does not transform the nullish coalescing syntax; it only enables Babel to understand it.

What are @babel/plugin-syntax-nullish-coalescing-operator's main functionalities?

Parsing nullish coalescing operator

This code demonstrates how the nullish coalescing operator is used to provide a default value ('default string') in case the left-hand operand (foo) is null or undefined.

const foo = null ?? 'default string';

Other packages similar to @babel/plugin-syntax-nullish-coalescing-operator

Readme

Source

@babel/plugin-syntax-nullish-coalescing-operator

Allow parsing of the nullish-coalescing operator

See our website @babel/plugin-syntax-nullish-coalescing-operator for more information.

Install

Using npm:

npm install --save-dev @babel/plugin-syntax-nullish-coalescing-operator

or using yarn:

yarn add @babel/plugin-syntax-nullish-coalescing-operator --dev

Keywords

FAQs

Last updated on 13 Jan 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