We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 796cbe2 commit f8b8b61Copy full SHA for f8b8b61
functions/parse.js
@@ -1,11 +1,6 @@
1
const { MAX_LENGTH } = require('../internal/constants')
2
-const { re, t } = require('../internal/re')
3
const SemVer = require('../classes/semver')
4
-
5
-const parseOptions = require('../internal/parse-options')
6
const parse = (version, options) => {
7
- options = parseOptions(options)
8
9
if (version instanceof SemVer) {
10
return version
11
}
@@ -18,11 +13,6 @@ const parse = (version, options) => {
18
13
return null
19
14
20
15
21
- const r = options.loose ? re[t.LOOSE] : re[t.FULL]
22
- if (!r.test(version)) {
23
- return null
24
- }
25
26
16
try {
27
17
return new SemVer(version, options)
28
} catch (er) {
0 commit comments