Module: versions

Methods

(package, static) compareVersions(v1, v2) → {number}

Compares two versions.

Parameters:
Name Type Description
v1 string

The first version.

v2 string

The second version.

Source:
Returns:

-1 if v1 is older than v2; 1 if v1 is newer than v2; otherwise 0.

Type
number