@babel/plugin-transform-exponentiation-operator
Advanced tools
Comparing version 7.0.0-beta.49 to 7.0.0-beta.50
{ | ||
"name": "@babel/plugin-transform-exponentiation-operator", | ||
"version": "7.0.0-beta.49", | ||
"version": "7.0.0-beta.50", | ||
"description": "Compile exponentiation operator to ES5", | ||
@@ -12,4 +12,4 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-exponentiation-operator", | ||
"dependencies": { | ||
"@babel/helper-builder-binary-assignment-operator-visitor": "7.0.0-beta.49", | ||
"@babel/helper-plugin-utils": "7.0.0-beta.49" | ||
"@babel/helper-builder-binary-assignment-operator-visitor": "7.0.0-beta.50", | ||
"@babel/helper-plugin-utils": "7.0.0-beta.50" | ||
}, | ||
@@ -20,5 +20,5 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@babel/core": "7.0.0-beta.49", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.49" | ||
"@babel/core": "7.0.0-beta.50", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.50" | ||
} | ||
} |
@@ -5,55 +5,16 @@ # @babel/plugin-transform-exponentiation-operator | ||
## Example | ||
See our website [@babel/plugin-transform-exponentiation-operator](https://new.babeljs.io/docs/en/next/babel-plugin-transform-exponentiation-operator.html) for more information. | ||
**In** | ||
## Install | ||
```javascript | ||
let x = 10 ** 2; | ||
Using npm: | ||
x **= 3; | ||
``` | ||
**Out** | ||
```javascript | ||
let x = Math.pow(10, 2); | ||
x = Math.pow(x, 3); | ||
``` | ||
## Installation | ||
```sh | ||
npm install --save-dev @babel/plugin-transform-exponentiation-operator | ||
npm install --save @babel/plugin-transform-exponentiation-operator | ||
``` | ||
## Usage | ||
or using yarn: | ||
### Via `.babelrc` (Recommended) | ||
**.babelrc** | ||
```json | ||
{ | ||
"plugins": ["@babel/plugin-transform-exponentiation-operator"] | ||
} | ||
``` | ||
### Via CLI | ||
```sh | ||
babel --plugins @babel/plugin-transform-exponentiation-operator script.js | ||
yarn add --save @babel/plugin-transform-exponentiation-operator | ||
``` | ||
### Via Node API | ||
```javascript | ||
require("@babel/core").transform("code", { | ||
plugins: ["@babel/plugin-transform-exponentiation-operator"] | ||
}); | ||
``` | ||
## References | ||
* [Proposal: Exponentiation Operator](https://github.com/rwaldron/exponentiation-operator) | ||
* [Spec: Exponential Operator](https://rwaldron.github.io/exponentiation-operator/) |
2357
3
20
+ Added@babel/helper-builder-binary-assignment-operator-visitor@7.0.0-beta.50(transitive)
+ Added@babel/helper-explode-assignable-expression@7.0.0-beta.50(transitive)
+ Added@babel/helper-plugin-utils@7.0.0-beta.50(transitive)
- Removed@babel/helper-builder-binary-assignment-operator-visitor@7.0.0-beta.49(transitive)
- Removed@babel/helper-explode-assignable-expression@7.0.0-beta.49(transitive)
- Removed@babel/helper-plugin-utils@7.0.0-beta.49(transitive)
Updated@babel/helper-builder-binary-assignment-operator-visitor@7.0.0-beta.50