Socket
Socket
Sign inDemoInstall

resolve-from

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve-from - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

14

index.js

@@ -14,7 +14,11 @@ 'use strict';

return Module._resolveFilename(moduleId, {
id: fromFile,
filename: fromFile,
paths: Module._nodeModulePaths(fromDir)
});
try {
return Module._resolveFilename(moduleId, {
id: fromFile,
filename: fromFile,
paths: Module._nodeModulePaths(fromDir)
});
} catch (err) {
return null;
}
};
{
"name": "resolve-from",
"version": "1.0.1",
"version": "2.0.0",
"description": "Resolve the path of a module like require.resolve() but from a given path",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -5,3 +5,5 @@ # resolve-from [![Build Status](https://travis-ci.org/sindresorhus/resolve-from.svg?branch=master)](https://travis-ci.org/sindresorhus/resolve-from)

Unlike `require.resolve()` it returns `null` instead of throwing when the module can't be found.
## Install

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

The directory to resolve from.
Directory to resolve from.

@@ -37,0 +39,0 @@ #### moduleId

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