Last change
on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
434 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | Object.defineProperty(exports, "__esModule", {
|
---|
4 | value: true
|
---|
5 | });
|
---|
6 | exports.hasMinVersion = hasMinVersion;
|
---|
7 |
|
---|
8 | var _semver = require("semver");
|
---|
9 |
|
---|
10 | function 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 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.