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

requireg

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

requireg - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

4

lib/requireg.js

@@ -30,3 +30,3 @@ var fs = require('fs')

function resolve(module) {
function resolve(module, dirname) {
var i, resolver, modulePath

@@ -36,3 +36,3 @@

resolver = resolvers[i]
if (modulePath = resolver(module)) {
if (modulePath = resolver(module, dirname)) {
break

@@ -39,0 +39,0 @@ }

@@ -27,5 +27,5 @@ var fs = require('fs')

// if NODE_PATH is define, a global module should be natively resolved
function nativeResolve(module) {
function nativeResolve(module, dirname) {
try {
return require.resolve(module)
return require.resolve(module, dirname)
} catch (e) {}

@@ -36,3 +36,3 @@ }

// required?
function nodePathResolve(module) {
function nodePathResolve(module, dirname) {
var i, l, modulePath

@@ -53,3 +53,3 @@ var nodePath = process.env.NODE_PATH

for (i = 0, l = nodePath.length; i < l; i += 1) {
if (modulePath = resolveFn(module, nodePath[i])) {
if (modulePath = resolveFn(module, dirname || nodePath[i])) {
break;

@@ -56,0 +56,0 @@ }

{
"name": "requireg",
"version": "0.1.2",
"version": "0.1.3",
"description": "Require global modules like a boss",

@@ -41,4 +41,5 @@ "homepage": "http://github.com/h2non/requireg",

"mocha": "~1.15.1",
"expect.js": "~0.2.0"
"expect.js": "~0.2.0",
"semver": "~2.2.1"
}
}
}

Sorry, the diff of this file is not supported yet

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