The version to increment
The release type to use, could be "major", "premajor", "minor", "preminor", "patch", "prepatch", "prerelease", 'release'
Optional
identifier: stringThe identifier to use for prerelease versions
Optional
identifierBase: false | IdentifierBaseThe base to use for the identifier, could be '0' or '1'
Optional
optionsOrLoose: boolean | OptionsAn options object { loose }
(where loose is the only available option) or a boolean indicating whether to enable loose mode. In loose mode, the parser is more forgiving with imperfectly formatted semver strings
The incremented version
Return the version incremented by the release type (major, premajor, minor, preminor, patch, prepatch, or prerelease)
Throws
TypeError if the version string is invalid or if there are other errors
Example
Remarks
unlike
inc()
which returnsnull
if error occurs, this function could throw error