Comparing version 2.0.1 to 2.0.2
{ | ||
"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); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
533479
40816