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