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

babel-helper-builder-conditional-assignment-operator-visitor

Package Overview
Dependencies
Maintainers
6
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-helper-builder-conditional-assignment-operator-visitor - npm Package Compare versions

Comparing version 6.8.0 to 6.18.0

15

lib/index.js

@@ -1,2 +0,2 @@

/*istanbul ignore next*/"use strict";
"use strict";

@@ -11,3 +11,2 @@ exports.__esModule = true;

exports.ExpressionStatement = function (path, file) {
// hit the `AssignmentExpression` one below
if (path.isCompletionRecord()) return;

@@ -20,3 +19,3 @@

var exploded = /*istanbul ignore next*/(0, _babelHelperExplodeAssignableExpression2.default)(expr.left, nodes, file, path.scope);
var exploded = (0, _babelHelperExplodeAssignableExpression2.default)(expr.left, nodes, file, path.scope);

@@ -33,7 +32,6 @@ nodes.push(t.ifStatement(opts.build(exploded.uid, file), t.expressionStatement(buildAssignment(exploded.ref, expr.right))));

var nodes = [];
var exploded = /*istanbul ignore next*/(0, _babelHelperExplodeAssignableExpression2.default)(node.left, nodes, file, path.scope);
var exploded = (0, _babelHelperExplodeAssignableExpression2.default)(node.left, nodes, file, path.scope);
nodes.push(t.logicalExpression("&&", opts.build(exploded.uid, file), buildAssignment(exploded.ref, node.right)));
// todo: duplicate expression node
nodes.push(exploded.ref);

@@ -45,13 +43,10 @@

var /*istanbul ignore next*/_babelHelperExplodeAssignableExpression = require("babel-helper-explode-assignable-expression");
var _babelHelperExplodeAssignableExpression = require("babel-helper-explode-assignable-expression");
/*istanbul ignore next*/
var _babelHelperExplodeAssignableExpression2 = _interopRequireDefault(_babelHelperExplodeAssignableExpression);
var /*istanbul ignore next*/_babelTypes = require("babel-types");
var _babelTypes = require("babel-types");
/*istanbul ignore next*/
var t = _interopRequireWildcard(_babelTypes);
/*istanbul ignore next*/
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; } }

@@ -58,0 +53,0 @@

{
"name": "babel-helper-builder-conditional-assignment-operator-visitor",
"version": "6.8.0",
"description": "",
"version": "6.18.0",
"description": "Helper function to build conditional assignment operator visitors",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-builder-conditional-assignment-operator-visitor",

@@ -9,6 +9,6 @@ "license": "MIT",

"dependencies": {
"babel-helper-explode-assignable-expression": "^6.8.0",
"babel-helper-explode-assignable-expression": "^6.18.0",
"babel-runtime": "^6.0.0",
"babel-types": "^6.8.0"
"babel-types": "^6.18.0"
}
}
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