helpers.js 434 B

1234567891011121314
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.hasMinVersion = hasMinVersion;
  6. var _semver = require("semver");
  7. function hasMinVersion(minVersion, runtimeVersion) {
  8. if (!runtimeVersion) return true;
  9. if (_semver.valid(runtimeVersion)) runtimeVersion = `^${runtimeVersion}`;
  10. return !_semver.intersects(`<${minVersion}`, runtimeVersion) && !_semver.intersects(`>=8.0.0`, runtimeVersion);
  11. }