babel-plugin-minify-flip-comparisons
Advanced tools
Comparing version 0.5.0-alpha.b5bafaeb to 0.5.0-alpha.e86a44f1
"use strict"; | ||
module.exports = function (_ref) { | ||
var t = _ref.types; | ||
module.exports = function ({ | ||
types: t | ||
}) { | ||
const isVoid0 = require("babel-helper-is-void-0")(t); | ||
var isVoid0 = require("babel-helper-is-void-0")(t); | ||
return { | ||
@@ -16,5 +16,5 @@ name: "minify-flip-comparisons", | ||
BinaryExpression(path) { | ||
var node = path.node; | ||
var right = node.right, | ||
left = node.left; // Make sure we have a constant on the right. | ||
const node = path.node; | ||
const right = node.right, | ||
left = node.left; // Make sure we have a constant on the right. | ||
@@ -35,3 +35,3 @@ if (!t.isLiteral(right) && !isVoid0(right) && !(t.isUnaryExpression(right) && t.isLiteral(right.argument)) && !t.isObjectExpression(right) && !t.isArrayExpression(right)) { | ||
node.right = left; | ||
var operator; | ||
let operator; | ||
@@ -38,0 +38,0 @@ switch (node.operator) { |
{ | ||
"name": "babel-plugin-minify-flip-comparisons", | ||
"version": "0.5.0-alpha.b5bafaeb", | ||
"version": "0.5.0-alpha.e86a44f1", | ||
"description": "", | ||
@@ -15,4 +15,4 @@ "keywords": [ | ||
"dependencies": { | ||
"babel-helper-is-void-0": "^0.5.0-alpha.b5bafaeb" | ||
"babel-helper-is-void-0": "^0.5.0-alpha.e86a44f1" | ||
} | ||
} |
48
2909