require-in-the-middle
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -23,2 +23,3 @@ 'use strict' | ||
if (core) { | ||
if (modules && modules.indexOf(filename) === -1) return exports // abort if module name isn't on whitelist | ||
name = filename | ||
@@ -31,2 +32,4 @@ } else { | ||
if (modules && modules.indexOf(name) === -1) return exports // abort if module name isn't on whitelist | ||
// figure out if this is the main module file, or a file inside the module | ||
@@ -36,3 +39,3 @@ try { | ||
} catch (e) { | ||
return exports | ||
return exports // abort if module could not be resolved (e.g. no main in package.json and no index.js file) | ||
} | ||
@@ -42,5 +45,2 @@ if (res !== filename) return exports // abort if not main module file | ||
// abort if module name isn't on whitelist | ||
if (modules && modules.indexOf(name) === -1) return exports | ||
if (patched[filename]) return exports // abort if module have already been processed | ||
@@ -47,0 +47,0 @@ patched[filename] = true |
{ | ||
"name": "require-in-the-middle", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "Module to hook into the Node.js require function", | ||
@@ -43,5 +43,5 @@ "main": "index.js", | ||
"coordinates": [ | ||
55.6665551, | ||
12.5801899 | ||
55.6665906, | ||
12.580154 | ||
] | ||
} |
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
5538