mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 16:30:29 +08:00
chore: init frontend-source directory with tooling scaffold
Former-commit-id: 435fb8e3e4f8e334ad3b0e95052edbdd9547d197
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
'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
|
||||
Reference in New Issue
Block a user