module-definition
Advanced tools
Comparing version 1.2.3 to 1.2.4
12
index.js
@@ -5,12 +5,2 @@ var Walker = require('node-source-walk'), | ||
// Allows us to differentiate from the funky commonjs case | ||
function hasAMDArguments(requireNode) { | ||
var args = requireNode.arguments; | ||
return args && | ||
args[0].type !== 'Literal' && | ||
// For some dynamic node requires | ||
args[0].type !== 'Identifier'; | ||
} | ||
function fromSource(source) { | ||
@@ -40,3 +30,3 @@ if (typeof source === 'undefined') throw new Error('source not supplied'); | ||
if (types.isTopLevelRequire(node) && hasAMDArguments(node)) { | ||
if (types.isAMDDriverScriptRequire(node)) { | ||
hasAMDTopLevelRequire = true; | ||
@@ -43,0 +33,0 @@ } |
{ | ||
"name": "module-definition", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "Determines if a file is using a CommonJS or AMD module definition", | ||
@@ -20,3 +20,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"ast-module-types": "^1.1.1", | ||
"ast-module-types": "^1.2.0", | ||
"node-source-walk": "^1.1.0" | ||
@@ -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
6446
160
Updatedast-module-types@^1.2.0