Comparing version 4.0.1 to 4.0.2
var aparse = require('acorn').parse; | ||
var defined = require('defined'); | ||
var requireRe = /\brequire\b/; | ||
function parse (src, opts) { | ||
@@ -70,3 +72,4 @@ if (!opts) opts = {}; | ||
if (src.indexOf(word) == -1) return modules; | ||
var wordRe = word === 'require' ? requireRe : RegExp('\\b' + word + '\\b'); | ||
if (!wordRe.test(src)) return modules; | ||
@@ -73,0 +76,0 @@ walk(src, opts.parse, function (node) { |
{ | ||
"name": "detective", | ||
"description": "find all require() calls by walking the AST", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "type": "git", |
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
17074
34
407