amd-optimizer
Advanced tools
Comparing version 0.3.3 to 0.3.4
{ | ||
"name": "amd-optimizer", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -46,8 +46,16 @@ var traverse = require('ast-traverse'); | ||
&& expression.operator === '&&' | ||
&& isTypeofFunction(expression.left) | ||
&& isDefineAmd(expression.right); | ||
&& (isTypeofFunction(expression.left) | ||
|| isSecondLevelUmdTest(expression.left) | ||
) && isDefineAmd(expression.right); | ||
} | ||
function isSecondLevelUmdTest(expression){ | ||
return expression && expression.type === 'LogicalExpression' | ||
&& expression.operator === '&&' | ||
&& isTypeofFunction(expression.left); | ||
} | ||
function isTypeofFunction(expression){ | ||
return expression && expression.operator === '===' | ||
return expression && expression.type === 'BinaryExpression' | ||
&& expression.operator === '===' | ||
&& expression.left.type === 'UnaryExpression' | ||
@@ -54,0 +62,0 @@ && expression.left.argument |
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
30276
42
830
10