source: frontend/node_modules/semver/functions/parse.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 331 bytes
Line 
1'use strict'
2
3const SemVer = require('../classes/semver')
4const parse = (version, options, throwErrors = false) => {
5 if (version instanceof SemVer) {
6 return version
7 }
8 try {
9 return new SemVer(version, options)
10 } catch (er) {
11 if (!throwErrors) {
12 return null
13 }
14 throw er
15 }
16}
17
18module.exports = parse
Note: See TracBrowser for help on using the repository browser.