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

module-exists

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

module-exists - npm Package Compare versions

Comparing version 0.2.1 to 0.4.0

lib/index.test.js

0

index.d.ts

@@ -0,0 +0,0 @@ declare module 'module-exists' {

5

lib/index.js

@@ -7,4 +7,5 @@ /*global module, require*/

try {
require(name);
require.resolve(name);
} catch (err) {
console.log('err ', err.code)
if (err.code === 'MODULE_NOT_FOUND') {

@@ -17,2 +18,2 @@ return false;

};
}());
}());

@@ -6,5 +6,5 @@ {

"scripts": {
"test": "nodeunit test/test.js"
"test": "jest"
},
"version": "0.2.1",
"version": "0.4.0",
"homepage": "https://github.com/tobiasoberrauch/module-exists",

@@ -17,2 +17,5 @@ "author": {

"name": "Tushar Mathur"
},
{
"name": "André Cruz"
}

@@ -25,3 +28,3 @@ ],

"devDependencies": {
"nodeunit": "~0.7.4"
"jest": "^26.1.0"
},

@@ -28,0 +31,0 @@ "keywords": [

@@ -0,0 +0,0 @@ # module exists

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