Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-es2015-computed-properties

Package Overview
Dependencies
Maintainers
5
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-es2015-computed-properties - npm Package Compare versions

Comparing version 7.0.0-alpha.19 to 7.0.0-alpha.20

30

lib/index.js

@@ -60,8 +60,8 @@ "use strict";

var prop = _ref3;
var _prop = _ref3;
if (prop.kind === "get" || prop.kind === "set") {
pushMutatorDefine(info, prop);
if (_prop.kind === "get" || _prop.kind === "set") {
pushMutatorDefine(info, _prop);
} else {
pushAssign(info.objId, prop, info.body);
pushAssign(info.objId, _prop, info.body);
}

@@ -89,16 +89,16 @@ }

var prop = _ref4;
var key = t.toComputedKey(prop);
var _prop2 = _ref4;
var key = t.toComputedKey(_prop2);
if (prop.kind === "get" || prop.kind === "set") {
pushMutatorDefine(info, prop);
if (_prop2.kind === "get" || _prop2.kind === "set") {
pushMutatorDefine(info, _prop2);
} else if (t.isStringLiteral(key, {
value: "__proto__"
})) {
pushAssign(objId, prop, body);
pushAssign(objId, _prop2, body);
} else {
if (computedProps.length === 1) {
return t.callExpression(state.addHelper("defineProperty"), [info.initPropExpression, key, getValue(prop)]);
return t.callExpression(state.addHelper("defineProperty"), [info.initPropExpression, key, getValue(_prop2)]);
} else {
body.push(t.expressionStatement(t.callExpression(state.addHelper("defineProperty"), [objId, key, getValue(prop)])));
body.push(t.expressionStatement(t.callExpression(state.addHelper("defineProperty"), [objId, key, getValue(_prop2)])));
}

@@ -142,5 +142,5 @@ }

var _prop = _ref5;
var _prop4 = _ref5;
if (_prop.computed) {
if (_prop4.computed) {
foundComputed = true;

@@ -150,5 +150,5 @@ }

if (foundComputed) {
computedProps.push(_prop);
computedProps.push(_prop4);
} else {
initProps.push(_prop);
initProps.push(_prop4);
}

@@ -155,0 +155,0 @@ }

{
"name": "babel-plugin-transform-es2015-computed-properties",
"version": "7.0.0-alpha.19",
"version": "7.0.0-alpha.20",
"description": "Compile ES2015 computed properties to ES5",

@@ -12,7 +12,7 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-computed-properties",

"dependencies": {
"babel-template": "7.0.0-alpha.19"
"babel-template": "7.0.0-alpha.20"
},
"devDependencies": {
"babel-helper-plugin-test-runner": "7.0.0-alpha.19"
"babel-helper-plugin-test-runner": "7.0.0-alpha.20"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc