first version string
second version string
Optional
optionsOrLoose: boolean | Optionsan options object { loose }
(where loose is the only available option) or a boolean indicating whether to enable loose mode. In loose mode, the parser is more forgiving with imperfectly formatted semver strings
true
if v1 == v2, false
if v1 != v2
v1 == v2 This is true if they're logically equivalent, even if they're not the exact same string. You already know how to compare strings.
Example
Remarks
build identifier (
[+BUILD]
) is not taken into account