babel-plugin-minify-flip-comparisons
Advanced tools
Comparing version 0.5.0-alpha.55276695 to 0.5.0-alpha.01eac1c3
"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.55276695", | ||
"version": "0.5.0-alpha.01eac1c3", | ||
"description": "", | ||
@@ -15,4 +15,4 @@ "keywords": [ | ||
"dependencies": { | ||
"babel-helper-is-void-0": "^0.5.0-alpha.55276695" | ||
"babel-helper-is-void-0": "^0.5.0-alpha.01eac1c3" | ||
} | ||
} |
@@ -28,3 +28,3 @@ # babel-plugin-minify-flip-comparisons | ||
```sh | ||
npm install babel-plugin-minify-flip-comparisons | ||
npm install babel-plugin-minify-flip-comparisons --save-dev | ||
``` | ||
@@ -31,0 +31,0 @@ |
2920
48