Socket
Socket
Sign inDemoInstall

semver

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

semver - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

2

package.json
{
"name": "semver",
"version": "2.0.1",
"version": "2.0.2",
"description": "The semantic version parser used by npm.",

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

@@ -6,14 +6,14 @@ // export the class if we are in a Node-like system.

// The debug function is excluded entirely from the minified version.
/* nomin */var debug;
/* nomin */if (typeof process === 'object' &&
/* nomin */ process.env &&
/* nomin */ process.env.NODE_DEBUG &&
/* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG))
/* nomin */ debug = function() {
/* nomin */ var args = Array.prototype.slice.call(arguments, 0);
/* nomin */ args.unshift('SEMVER');
/* nomin */ console.log.apply(console, args);
/* nomin */ };
/* nomin */else
/* nomin */ debug = function() {};
/* nomin */ var debug;
/* nomin */ if (typeof process === 'object' &&
/* nomin */ process.env &&
/* nomin */ process.env.NODE_DEBUG &&
/* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG))
/* nomin */ debug = function() {
/* nomin */ var args = Array.prototype.slice.call(arguments, 0);
/* nomin */ args.unshift('SEMVER');
/* nomin */ console.log.apply(console, args);
/* nomin */ };
/* nomin */ else
/* nomin */ debug = function() {};

@@ -37,3 +37,3 @@ // Note: this is the semver.org version of the spec that it implements

src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
var NUMERICIDENTIFIERLOOSE = R++
var NUMERICIDENTIFIERLOOSE = R++;
src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';

@@ -222,8 +222,15 @@

exports.valid = exports.parse = parse;
exports.parse = parse;
function parse(version, loose) {
var r = loose ? re[LOOSE] : re[FULL]
var r = loose ? re[LOOSE] : re[FULL];
return (r.test(version)) ? new SemVer(version, loose) : null;
}
exports.valid = valid;
function valid(version, loose) {
var v = parse(version, loose);
return v ? v.version : false;
}
exports.clean = clean;

@@ -286,3 +293,3 @@ function clean(version, loose) {

SemVer.prototype.toString = function() {
return this.value;
return this.version;
};

@@ -628,3 +635,3 @@

return comp;
};
}

@@ -824,3 +831,3 @@ function isX(id) {

// Use the define() function if we're in AMD land
if (typeof define === "function" && define.amd)
if (typeof define === 'function' && define.amd)
define(exports);
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