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

require-in-the-middle

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

require-in-the-middle - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

8

index.js

@@ -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
]
}
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