18 lines
361 B
JavaScript
18 lines
361 B
JavaScript
"use strict";
|
|
|
|
var SemVer = require('../classes/semver');
|
|
|
|
var inc = function inc(version, release, options, identifier) {
|
|
if (typeof options === 'string') {
|
|
identifier = options;
|
|
options = undefined;
|
|
}
|
|
|
|
try {
|
|
return new SemVer(version, options).inc(release, identifier).version;
|
|
} catch (er) {
|
|
return null;
|
|
}
|
|
};
|
|
|
|
module.exports = inc; |