1 | const SemVer = require('../classes/semver')
|
2 |
|
3 | const inc = (version, release, options, identifier) => {
|
4 | if (typeof (options) === 'string') {
|
5 | identifier = options
|
6 | options = undefined
|
7 | }
|
8 |
|
9 | try {
|
10 | return new SemVer(
|
11 | version instanceof SemVer ? version.version : version,
|
12 | options
|
13 | ).inc(release, identifier).version
|
14 | } catch (er) {
|
15 | return null
|
16 | }
|
17 | }
|
18 | module.exports = inc
|