1
0
Files
setup-deno/node_modules/semver/functions/inc.js
T

20 lines
464 B
JavaScript
Raw Normal View History

2021-04-10 02:16:12 +02:00
const SemVer = require('../classes/semver')
2024-09-13 17:15:41 +02:00
const inc = (version, release, options, identifier, identifierBase) => {
2021-04-10 02:16:12 +02:00
if (typeof (options) === 'string') {
2024-09-13 17:15:41 +02:00
identifierBase = identifier
2021-04-10 02:16:12 +02:00
identifier = options
options = undefined
}
try {
2022-10-17 12:03:20 +02:00
return new SemVer(
version instanceof SemVer ? version.version : version,
options
2024-09-13 17:15:41 +02:00
).inc(release, identifier, identifierBase).version
2021-04-10 02:16:12 +02:00
} catch (er) {
return null
}
}
module.exports = inc