CoolFace
Apppublic

strong-tie/inbound-calls

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
parse.js17 linesDownload Raw Back to functions
1const SemVer = require('../classes/semver')2const parse = (version, options, throwErrors = false) => {3  if (version instanceof SemVer) {4    return version5  }6  try {7    return new SemVer(version, options)8  } catch (er) {9    if (!throwErrors) {10      return null11    }12    throw er13  }14}15 16module.exports = parse17