Files
skills-here-run-place/node_modules/sharp/node_modules/semver/functions/parse.js
Alejandro Martinez f09af719cf Initial commit
2026-02-12 02:04:10 +01:00

19 lines
331 B
JavaScript

'use strict'
const SemVer = require('../classes/semver')
const parse = (version, options, throwErrors = false) => {
if (version instanceof SemVer) {
return version
}
try {
return new SemVer(version, options)
} catch (er) {
if (!throwErrors) {
return null
}
throw er
}
}
module.exports = parse