babel-plugin-minify-infinity
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; | ||
var INFINITY = t.binaryExpression("/", t.numericLiteral(1), t.numericLiteral(0)); | ||
module.exports = function ({ | ||
types: t | ||
}) { | ||
const INFINITY = t.binaryExpression("/", t.numericLiteral(1), t.numericLiteral(0)); | ||
return { | ||
@@ -30,3 +31,7 @@ name: "minify-infinity", | ||
if (path.isLVal() && !path.parentPath.isExpressionStatement()) { | ||
const bindingIds = path.parentPath.getBindingIdentifierPaths(); | ||
if (bindingIds["Infinity"] === path && // ObjectProperty is common for ObjectExpression and ObjectPattern and only | ||
// one of them is a Binding, the other is simply a reference | ||
!path.parentPath.parentPath.isObjectExpression()) { | ||
return; | ||
@@ -33,0 +38,0 @@ } |
{ | ||
"name": "babel-plugin-minify-infinity", | ||
"version": "0.5.0-alpha.55276695", | ||
"version": "0.5.0-alpha.01eac1c3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -20,3 +20,3 @@ # babel-plugin-minify-infinity | ||
```sh | ||
npm install babel-plugin-minify-infinity | ||
npm install babel-plugin-minify-infinity --save-dev | ||
``` | ||
@@ -23,0 +23,0 @@ |
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
1950
34