versions.js 407 B

12345678910
  1. export const minNodeVersion = 10;
  2. /**
  3. * @hidden
  4. */
  5. export const parseVersion = (version) => {
  6. const [, major, minor, patch] = /^v([0-9]+)\.([0-9]+)\.([0-9]+)/.exec(version) || [];
  7. return { major: Number(major), minor: Number(minor), patch: Number(patch) };
  8. };
  9. export const compareVersion = (a, b) => a.major - b.major || a.minor - b.minor || a.patch - b.patch;
  10. //# sourceMappingURL=versions.js.map