ast-module-types
Advanced tools
Comparing version 2.3.1 to 2.3.2
@@ -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)); |
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
11875
232