This module provides a function to compare string versions by using semver strategy.
import check from 'core/semver';console.log(check('1.4.1', '1.5.2', '>')); // falseconsole.log(check('1', '1.5.2', '==')); // trueconsole.log(check('2.4.1', '2.4', '<=')); // trueconsole.log(check('2.4', '2.4.2', '^=')); // true
Note: The module currently supports only a numeric comparison with x-ranges. Without beta, alpha or rc postfixes.
beta
alpha
rc
==
^=
~=
>
<
>=
<=
Compares two strings with number versions (a b) by using the semver strategy
operation type
core/semver
This module provides a function to compare string versions by using semver strategy.
Supported Comparisons
==
equal^=
caret range~=
tilda range>
greater than<
less than>=
greater than or equal to<=
less than or equal to