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
4
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.15 to 7.0.0-alpha.16

49

lib/index.js

@@ -8,3 +8,2 @@ "use strict";

template = _ref.template;
var buildMutatorMapAssign = template("\n MUTATOR_MAP_REF[KEY] = MUTATOR_MAP_REF[KEY] || {};\n MUTATOR_MAP_REF[KEY].KIND = VALUE;\n ");

@@ -33,6 +32,5 @@

scope = _ref2.scope;
var key = !prop.computed && t.isIdentifier(prop.key) ? t.stringLiteral(prop.key.name) : prop.key;
var maybeMemoise = scope.maybeGenerateMemoised(key);
var maybeMemoise = scope.maybeGenerateMemoised(key);
if (maybeMemoise) {

@@ -80,3 +78,2 @@ body.push(t.expressionStatement(t.assignmentExpression("=", maybeMemoise, key)));

for (var _iterator2 = computedProps, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {

@@ -95,3 +92,2 @@ var _ref4;

var prop = _ref4;
var key = t.toComputedKey(prop);

@@ -101,3 +97,5 @@

pushMutatorDefine(info, prop);
} else if (t.isStringLiteral(key, { value: "__proto__" })) {
} else if (t.isStringLiteral(key, {
value: "__proto__"
})) {
pushAssign(objId, prop, body);

@@ -121,23 +119,12 @@ } else {

scope = path.scope;
var hasComputed = false;
for (var _iterator3 = node.properties, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
var _ref5;
var _arr = node.properties;
if (_isArray3) {
if (_i3 >= _iterator3.length) break;
_ref5 = _iterator3[_i3++];
} else {
_i3 = _iterator3.next();
if (_i3.done) break;
_ref5 = _i3.value;
}
var prop = _ref5;
for (var _i3 = 0; _i3 < _arr.length; _i3++) {
var prop = _arr[_i3];
hasComputed = prop.computed === true;
if (hasComputed) break;
}
if (!hasComputed) return;
var initProps = [];

@@ -147,15 +134,15 @@ var computedProps = [];

for (var _iterator4 = node.properties, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
var _ref6;
for (var _iterator3 = node.properties, _isArray3 = Array.isArray(_iterator3), _i4 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
var _ref5;
if (_isArray4) {
if (_i4 >= _iterator4.length) break;
_ref6 = _iterator4[_i4++];
if (_isArray3) {
if (_i4 >= _iterator3.length) break;
_ref5 = _iterator3[_i4++];
} else {
_i4 = _iterator4.next();
_i4 = _iterator3.next();
if (_i4.done) break;
_ref6 = _i4.value;
_ref5 = _i4.value;
}
var _prop = _ref6;
var _prop = _ref5;

@@ -176,8 +163,5 @@ if (_prop.computed) {

var body = [];
body.push(t.variableDeclaration("var", [t.variableDeclarator(objId, initPropExpression)]));
var callback = spec;
if (state.opts.loose) callback = loose;
var mutatorRef = void 0;

@@ -188,3 +172,2 @@

mutatorRef = scope.generateUidIdentifier("mutatorMap");
body.push(t.variableDeclaration("var", [t.variableDeclarator(mutatorRef, t.objectExpression([]))]));

@@ -191,0 +174,0 @@ }

{
"name": "babel-plugin-transform-es2015-computed-properties",
"version": "7.0.0-alpha.15",
"version": "7.0.0-alpha.16",
"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.15"
"babel-template": "7.0.0-alpha.16"
},
"devDependencies": {
"babel-helper-plugin-test-runner": "7.0.0-alpha.15"
"babel-helper-plugin-test-runner": "7.0.0-alpha.16"
}
}
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