Socket
Socket
Sign inDemoInstall

babel-helper-flip-expressions

Package Overview
Dependencies
Maintainers
5
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-helper-flip-expressions - npm Package Compare versions

Comparing version 0.3.0-alpha.6ae655c0 to 0.3.0-alpha.6ceffb8d

18

lib/index.js
"use strict";
const flipSeen = Symbol("flipSeen");
var flipSeen = Symbol("flipSeen");

@@ -13,3 +13,5 @@ module.exports = function (t) {

// more nodes that could benifit from flipping than not.
shouldFlip(topNode, savings = 0) {
shouldFlip(topNode) {
var savings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
visit(topNode);

@@ -38,4 +40,4 @@ return savings > 0;

flip(node, resultNotUsed) {
let lastNodeDesc;
const ret = visit(node);
var lastNodeDesc = void 0;
var ret = visit(node);

@@ -45,5 +47,5 @@ ret[flipSeen] = true;

if (resultNotUsed && lastNodeDesc) {
var _lastNodeDesc = lastNodeDesc;
const parent = _lastNodeDesc.parent,
key = _lastNodeDesc.key;
var _lastNodeDesc = lastNodeDesc,
parent = _lastNodeDesc.parent,
key = _lastNodeDesc.key;

@@ -72,3 +74,3 @@ if (parent && key && t.isUnaryExpression(parent[key], { operator: "!" })) {

if (t.isBinaryExpression(node)) {
let operator;
var operator = void 0;
switch (node.operator) {

@@ -75,0 +77,0 @@ case "!==":

{
"name": "babel-helper-flip-expressions",
"version": "0.3.0-alpha.6ae655c0",
"version": "0.3.0-alpha.6ceffb8d",
"description": "",

@@ -5,0 +5,0 @@ "keywords": [

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