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

babel-helper-explode-assignable-expression

Package Overview
Dependencies
Maintainers
6
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-helper-explode-assignable-expression - npm Package Compare versions

Comparing version 7.0.0-beta.2 to 7.0.0-beta.3

60

lib/index.js
"use strict";
exports.__esModule = true;
exports.default = _default;
exports.default = function (node, nodes, file, scope, allowedSingleIdent) {
var obj = void 0;
var t = _interopRequireWildcard(require("babel-types"));
if (t.isIdentifier(node) && allowedSingleIdent) {
obj = node;
} else {
obj = getObjRef(node, nodes, file, scope);
}
var ref = void 0,
uid = void 0;
if (t.isIdentifier(node)) {
ref = node;
uid = obj;
} else {
var prop = getPropRef(node, nodes, file, scope);
var computed = node.computed || t.isLiteral(prop);
uid = ref = t.memberExpression(obj, prop, computed);
}
return {
uid: uid,
ref: ref
};
};
var _babelTypes = require("babel-types");
var t = _interopRequireWildcard(_babelTypes);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function getObjRef(node, nodes, file, scope) {
var ref = void 0;
var ref;

@@ -77,2 +49,28 @@ if (t.isSuper(node)) {

return temp;
}
function _default(node, nodes, file, scope, allowedSingleIdent) {
var obj;
if (t.isIdentifier(node) && allowedSingleIdent) {
obj = node;
} else {
obj = getObjRef(node, nodes, file, scope);
}
var ref, uid;
if (t.isIdentifier(node)) {
ref = node;
uid = obj;
} else {
var prop = getPropRef(node, nodes, file, scope);
var computed = node.computed || t.isLiteral(prop);
uid = ref = t.memberExpression(obj, prop, computed);
}
return {
uid: uid,
ref: ref
};
}
{
"name": "babel-helper-explode-assignable-expression",
"version": "7.0.0-beta.2",
"version": "7.0.0-beta.3",
"description": "Helper function to explode an assignable expression",

@@ -9,5 +9,5 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-explode-assignable-expression",

"dependencies": {
"babel-traverse": "7.0.0-beta.2",
"babel-types": "7.0.0-beta.2"
"babel-traverse": "7.0.0-beta.3",
"babel-types": "7.0.0-beta.3"
}
}
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