versions.js 469 B

123456789101112
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.minNodeVersion = 10;
  4. /**
  5. * @hidden
  6. */
  7. exports.parseVersion = (version) => {
  8. const [, major, minor, patch] = /^v([0-9]+)\.([0-9]+)\.([0-9]+)/.exec(version) || [];
  9. return { major: Number(major), minor: Number(minor), patch: Number(patch) };
  10. };
  11. exports.compareVersion = (a, b) => a.major - b.major || a.minor - b.minor || a.patch - b.patch;
  12. //# sourceMappingURL=versions.js.map