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

ast-module-types

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ast-module-types - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

4

index.js

@@ -43,5 +43,3 @@ // Whether or not the node represents an AMD define() call

node.arguments[0] && node.arguments[0].type &&
node.arguments[0].type !== 'Literal' &&
// For some dynamic node requires
node.arguments[0].type !== 'Identifier';
node.arguments[0].type === 'ArrayExpression';
};

@@ -48,0 +46,0 @@

{
"name": "ast-module-types",
"version": "2.3.1",
"version": "2.3.2",
"description": "Collection of useful helper functions when trying to determine module type (CommonJS or AMD) properties of an AST node.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -71,2 +71,6 @@ var types = require('../');

it('does not get confused with a commonjs require', function() {
assert(!check('require("foo");', types.isAMDDriverScriptRequire));
});
it('detects named form', function() {

@@ -73,0 +77,0 @@ assert(check('define("foobar", ["a"], function(a){});', types.isNamedForm));

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