* Proposal: Logical Assignment Operators https://github.com/jridgewell/proposal-logical-assignment I'm bringing it [back](https://github.com/babel/babel/pull/516). 😉 * Use expectPlugin * Add to stage 0 preset * Add logicalAssignment missing plugin log stuff
36 lines
598 B
Markdown
36 lines
598 B
Markdown
# @babel/plugin-syntax-logical-assignment-operators
|
|
|
|
> Allow parsing of the logical assignment operators.
|
|
|
|
## Installation
|
|
|
|
```sh
|
|
npm install --save-dev @babel/plugin-syntax-logical-assignment-operators
|
|
```
|
|
|
|
## Usage
|
|
|
|
### Via `.babelrc` (Recommended)
|
|
|
|
**.babelrc**
|
|
|
|
```json
|
|
{
|
|
"plugins": ["@babel/plugin-syntax-logical-assignment-operators"]
|
|
}
|
|
```
|
|
|
|
### Via CLI
|
|
|
|
```sh
|
|
babel --plugins @babel/plugin-syntax-logical-assignment-operators script.js
|
|
```
|
|
|
|
### Via Node API
|
|
|
|
```javascript
|
|
require("@babel/core").transform("code", {
|
|
plugins: ["@babel/plugin-syntax-logical-assignment-operators"]
|
|
});
|
|
```
|