babel-helper-flip-expressions
Advanced tools
Comparing version 0.3.0-alpha.cf9a0da2 to 0.3.0-alpha.d9c99d3f
"use strict"; | ||
var flipSeen = Symbol("flipSeen"); | ||
const flipSeen = Symbol("flipSeen"); | ||
@@ -13,5 +13,3 @@ module.exports = function (t) { | ||
// more nodes that could benifit from flipping than not. | ||
shouldFlip(topNode) { | ||
var savings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; | ||
shouldFlip(topNode, savings = 0) { | ||
visit(topNode); | ||
@@ -40,4 +38,4 @@ return savings > 0; | ||
flip(node, resultNotUsed) { | ||
var lastNodeDesc = void 0; | ||
var ret = visit(node); | ||
let lastNodeDesc; | ||
const ret = visit(node); | ||
@@ -47,5 +45,5 @@ ret[flipSeen] = true; | ||
if (resultNotUsed && lastNodeDesc) { | ||
var _lastNodeDesc = lastNodeDesc, | ||
parent = _lastNodeDesc.parent, | ||
key = _lastNodeDesc.key; | ||
var _lastNodeDesc = lastNodeDesc; | ||
const parent = _lastNodeDesc.parent, | ||
key = _lastNodeDesc.key; | ||
@@ -74,3 +72,3 @@ if (parent && key && t.isUnaryExpression(parent[key], { operator: "!" })) { | ||
if (t.isBinaryExpression(node)) { | ||
var operator = void 0; | ||
let operator; | ||
switch (node.operator) { | ||
@@ -77,0 +75,0 @@ case "!==": |
{ | ||
"name": "babel-helper-flip-expressions", | ||
"version": "0.3.0-alpha.cf9a0da2", | ||
"version": "0.3.0-alpha.d9c99d3f", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2923
78