您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

10 个月前
12345678910111213141516
  1. const SemVer = require('../classes/semver')
  2. const parse = (version, options, throwErrors = false) => {
  3. if (version instanceof SemVer) {
  4. return version
  5. }
  6. try {
  7. return new SemVer(version, options)
  8. } catch (er) {
  9. if (!throwErrors) {
  10. return null
  11. }
  12. throw er
  13. }
  14. }
  15. module.exports = parse