diff options
Diffstat (limited to 'node_modules/semver/semver.js')
-rw-r--r-- | node_modules/semver/semver.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/node_modules/semver/semver.js b/node_modules/semver/semver.js index 026173eab..544bc8312 100644 --- a/node_modules/semver/semver.js +++ b/node_modules/semver/semver.js @@ -515,6 +515,21 @@ function rcompareIdentifiers(a, b) { return compareIdentifiers(b, a); } +exports.major = major; +function major(a, loose) { + return new SemVer(a, loose).major; +} + +exports.minor = minor; +function minor(a, loose) { + return new SemVer(a, loose).minor; +} + +exports.patch = patch; +function patch(a, loose) { + return new SemVer(a, loose).patch; +} + exports.compare = compare; function compare(a, b, loose) { return new SemVer(a, loose).compare(b); |