UNPKG

434 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.hasMinVersion = hasMinVersion;
7
8var _semver = require("semver");
9
10function hasMinVersion(minVersion, runtimeVersion) {
11 if (!runtimeVersion) return true;
12 if (_semver.valid(runtimeVersion)) runtimeVersion = `^${runtimeVersion}`;
13 return !_semver.intersects(`<${minVersion}`, runtimeVersion) && !_semver.intersects(`>=8.0.0`, runtimeVersion);
14}
\No newline at end of file