mirror of
https://github.com/JonasunderscoreJones/api-worker.git
synced 2025-10-23 18:39:19 +02:00
12 lines
No EOL
469 B
JavaScript
12 lines
No EOL
469 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.minNodeVersion = 10;
|
|
/**
|
|
* @hidden
|
|
*/
|
|
exports.parseVersion = (version) => {
|
|
const [, major, minor, patch] = /^v([0-9]+)\.([0-9]+)\.([0-9]+)/.exec(version) || [];
|
|
return { major: Number(major), minor: Number(minor), patch: Number(patch) };
|
|
};
|
|
exports.compareVersion = (a, b) => a.major - b.major || a.minor - b.minor || a.patch - b.patch;
|
|
//# sourceMappingURL=versions.js.map
|