xref: /third_party/node/deps/npm/node_modules/semver/functions/inc.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/deps/npm/node_modules/semver/functions/
11cb0ef41Sopenharmony_ciconst SemVer = require('../classes/semver')
21cb0ef41Sopenharmony_ci
31cb0ef41Sopenharmony_ciconst inc = (version, release, options, identifier, identifierBase) => {
41cb0ef41Sopenharmony_ci  if (typeof (options) === 'string') {
51cb0ef41Sopenharmony_ci    identifierBase = identifier
61cb0ef41Sopenharmony_ci    identifier = options
71cb0ef41Sopenharmony_ci    options = undefined
81cb0ef41Sopenharmony_ci  }
91cb0ef41Sopenharmony_ci
101cb0ef41Sopenharmony_ci  try {
111cb0ef41Sopenharmony_ci    return new SemVer(
121cb0ef41Sopenharmony_ci      version instanceof SemVer ? version.version : version,
131cb0ef41Sopenharmony_ci      options
141cb0ef41Sopenharmony_ci    ).inc(release, identifier, identifierBase).version
151cb0ef41Sopenharmony_ci  } catch (er) {
161cb0ef41Sopenharmony_ci    return null
171cb0ef41Sopenharmony_ci  }
181cb0ef41Sopenharmony_ci}
191cb0ef41Sopenharmony_cimodule.exports = inc
20

Indexes created Thu Nov 07 10:32:03 CST 2024