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

npm-registry

Package Overview
Dependencies
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-registry - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

2

endpoints/packages.js

@@ -122,3 +122,3 @@ 'use strict';

add(normalize.packages(release, data));
add(normalize.packages(data, release));
});

@@ -125,0 +125,0 @@

@@ -55,4 +55,4 @@ 'use strict';

data._id = data.name = data.name || data._id || fallback.name || fallback._id;
data.licenses = fallback.licenses || data.licenses;
data.license = fallback.license || data.license;
data.licenses = to.licenses(data, fallback);
data.github = extract(data);

@@ -59,0 +59,0 @@ data.releases = releases;

@@ -25,2 +25,28 @@ 'use strict';

/**
* Decide the best way of merging license data.
*
* @param {Mixed} data
* @param {Mixed} fallback
* @returns {Mixed} The one that should be merged.
*/
exports.licenses = function licenses(data, fallback) {
var fblicenses = fallback.licenses
, dlicenses = data.licenses
, fbok, dok;
fbok = Array.isArray(fblicenses) && fblicenses.every(function every(license) {
return 'string' === exports.type(license);
});
dok = Array.isArray(dlicenses) && dlicenses.every(function every(license) {
return 'string' === exports.type(license);
});
if (dok && !fbok) return dlicenses;
if (fbok && !dok) return fblicenses;
return dlicenses || fblicenses;
};
/**
* Create a gravatar for the given email.

@@ -27,0 +53,0 @@ *

{
"name": "npm-registry",
"version": "0.1.5",
"version": "0.1.6",
"description": "An high available npm registry client",

@@ -5,0 +5,0 @@ "main": "index.js",

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