You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
336 B

4 years ago
  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