Socket
Socket
Sign inDemoInstall

package-json

Package Overview
Dependencies
8
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

21

index.js

@@ -11,3 +11,8 @@ 'use strict';

registryUrl(function (err, url) {
got(registryUrl + encodeURIComponent(name) + '/' + version, function (err, data) {
if (err === 404) {
cb(new Error('Package or version doesn\'t exist'));
return;
}
if (err) {

@@ -18,16 +23,4 @@ cb(err);

got(url + encodeURIComponent(name) + '/' + version, function (err, data) {
if (err === 404) {
cb(new Error('Package or version doesn\'t exist'));
return;
}
if (err) {
cb(err);
return;
}
cb(null, JSON.parse(data));
});
cb(null, JSON.parse(data));
});
};
{
"name": "package-json",
"version": "1.0.0",
"version": "1.0.1",
"description": "Get the package.json of a package from the npm registry",

@@ -32,3 +32,3 @@ "license": "MIT",

"got": "^1.0.1",
"registry-url": "^1.0.0"
"registry-url": "^2.0.0"
},

@@ -35,0 +35,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc