Socket
Socket
Sign inDemoInstall

@babel/plugin-syntax-logical-assignment-operators

Package Overview
Dependencies
54
Maintainers
6
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @babel/plugin-syntax-logical-assignment-operators

Allow parsing of the logical assignment operators


Version published
Maintainers
6
Install size
9.03 kB
Created

Package description

What is @babel/plugin-syntax-logical-assignment-operators?

The @babel/plugin-syntax-logical-assignment-operators package allows Babel to parse code that uses logical assignment operators. These operators combine logical operations with assignment expressions. This plugin only enables the syntax, and does not transform it. To transform the code, you would need to use another plugin or set of plugins that handle the transformation.

What are @babel/plugin-syntax-logical-assignment-operators's main functionalities?

Logical AND Assignment (&&=)

The logical AND assignment (&&=) operator only assigns the value of the right operand to the left operand if the left operand is truthy.

a &&= b;

Logical OR Assignment (||=)

The logical OR assignment (||=) operator assigns the value of the right operand to the left operand if the left operand is falsy.

a ||= b;

Logical Nullish Assignment (??=)

The logical nullish assignment (??=) operator assigns the value of the right operand to the left operand if the left operand is null or undefined.

a ??= b;

Other packages similar to @babel/plugin-syntax-logical-assignment-operators

Readme

Source

@babel/plugin-syntax-logical-assignment-operators

Allow parsing of the logical assignment operators

See our website @babel/plugin-syntax-logical-assignment-operators for more information.

Install

Using npm:

npm install --save-dev @babel/plugin-syntax-logical-assignment-operators

or using yarn:

yarn add @babel/plugin-syntax-logical-assignment-operators --dev

Keywords

FAQs

Last updated on 30 Jun 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