PATH:
usr
/
lib
/
node_modules
/
npm
/
node_modules
/
semver
/
functions
const { MAX_LENGTH } = require('../internal/constants') const { re, t } = require('../internal/re') const SemVer = require('../classes/semver') const parseOptions = require('../internal/parse-options') const parse = (version, options) => { options = parseOptions(options) if (version instanceof SemVer) { return version } if (typeof version !== 'string') { return null } if (version.length > MAX_LENGTH) { return null } const r = options.loose ? re[t.LOOSE] : re[t.FULL] if (!r.test(version)) { return null } try { return new SemVer(version, options) } catch (er) { return null } } module.exports = parse
[-] valid.js
[edit]
[-] gt.js
[edit]
[-] inc.js
[edit]
[+]
..
[-] compare-loose.js
[edit]
[-] satisfies.js
[edit]
[-] minor.js
[edit]
[-] rcompare.js
[edit]
[-] eq.js
[edit]
[-] parse.js
[edit]
[-] diff.js
[edit]
[-] compare-build.js
[edit]
[-] rsort.js
[edit]
[-] major.js
[edit]
[-] gte.js
[edit]
[-] lt.js
[edit]
[-] lte.js
[edit]
[-] patch.js
[edit]
[-] compare.js
[edit]
[-] sort.js
[edit]
[-] cmp.js
[edit]
[-] clean.js
[edit]
[-] coerce.js
[edit]
[-] prerelease.js
[edit]
[-] neq.js
[edit]