The to-be tested semantic version
string.
The range
to test the version
against.
Whether version
satisfies range
.
Test '1.2.3'
against '>2 <1 || ~1.2.*'
:
import { semver } from '@sgrud/core';
semver('1.2.3', '>2 <1 || ~1.2.*'); // true
Test '1.2.3'
against '~1.1'
:
import { semver } from '@sgrud/core';
semver('1.2.3', '~1.1'); // false
Generated using TypeDoc
Best-effort semver matcher. The supplied
version
will be tested against the suppliedrange
.