UNPKG

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