Skip to content

five-on-it / packages/shared/src/version / compareReleases

Function: compareReleases() ​

compareReleases(a, b): number

Defined in: packages/shared/src/version.ts:19

Orders two releases (0.54.0, 0.54.0-rc.1): negative when a is older than b, 0 when they are the same, positive when newer. A pre-release is older than its release; anything that is not a version is older than every version.

Parameters ​

a ​

string

b ​

string

Returns ​

number