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 5.0.2 to 5.0.3

12

index.js

@@ -11,2 +11,12 @@ 'use strict'

const builtins = Module.builtinModules
const isCore = builtins
? (filename) => builtins.includes(filename)
// Fallback in case `builtins` isn't available in the current Node.js
// version. This isn't as acurate, as some core modules contain slashes, but
// all modern versions of Node.js supports `buildins`, so it shouldn't affect
// many people.
: (filename) => filename.includes(path.sep) === false
// 'foo/bar.js' or 'foo/bar/index.js' => 'foo/bar'

@@ -53,3 +63,3 @@ const normalize = /([/\\]index)?(\.js)?$/

const filename = Module._resolveFilename(id, this)
const core = filename.includes(path.sep) === false
const core = isCore(filename)
let moduleName, basedir

@@ -56,0 +66,0 @@

7

package.json
{
"name": "require-in-the-middle",
"version": "5.0.2",
"version": "5.0.3",
"description": "Module to hook into the Node.js require function",

@@ -15,2 +15,3 @@ "main": "index.js",

"roundround": "^0.2.0",
"semver": "^6.3.0",
"standard": "^14.3.1",

@@ -45,5 +46,5 @@ "tape": "^4.11.0"

"coordinates": [
55.776571,
12.592961
56.009779,
11.962099
]
}
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