inc.js 336 B

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