Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amd-optimizer

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amd-optimizer - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

test/basic/modules/umd4.js

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc