@babel/plugin-transform-computed-properties
Advanced tools
+2
-5
| import { types } from '@babel/core'; | ||
| import { declare } from '@babel/helper-plugin-utils'; | ||
| import '@babel/template'; | ||
| var index = declare((api, options) => { | ||
| api.assertVersion("8.0.0-beta.3"); | ||
| api.assertVersion("^7.0.0-0 || ^8.0.0 || 8.0.0-beta.4"); | ||
| const setComputedProperties = api.assumption("setComputedProperties") ?? options.loose; | ||
@@ -13,5 +12,3 @@ const pushComputedProps = setComputedProperties ? pushComputedPropsLoose : pushComputedPropsSpec; | ||
| const fn = getValue(prop); | ||
| { | ||
| return types.callExpression(state.addHelper("defineAccessor"), [types.stringLiteral(type), obj, key, fn]); | ||
| } | ||
| return types.callExpression(state.addHelper("defineAccessor"), [types.stringLiteral(type), obj, key, fn]); | ||
| } | ||
@@ -18,0 +15,0 @@ function getValue(prop) { |
+5
-6
| { | ||
| "name": "@babel/plugin-transform-computed-properties", | ||
| "version": "8.0.0-beta.3", | ||
| "version": "8.0.0-beta.4", | ||
| "description": "Compile ES2015 computed properties to ES5", | ||
@@ -20,11 +20,10 @@ "repository": { | ||
| "dependencies": { | ||
| "@babel/helper-plugin-utils": "^8.0.0-beta.3", | ||
| "@babel/template": "^8.0.0-beta.3" | ||
| "@babel/helper-plugin-utils": "^8.0.0-beta.4" | ||
| }, | ||
| "peerDependencies": { | ||
| "@babel/core": "^8.0.0-beta.3" | ||
| "@babel/core": "^7.0.0-0" | ||
| }, | ||
| "devDependencies": { | ||
| "@babel/core": "^8.0.0-beta.3", | ||
| "@babel/helper-plugin-test-runner": "^8.0.0-beta.3" | ||
| "@babel/core": "^8.0.0-beta.4", | ||
| "@babel/helper-plugin-test-runner": "^8.0.0-beta.4" | ||
| }, | ||
@@ -31,0 +30,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
2
-33.33%20224
-6.37%139
-2.11%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed