MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / compareVersions

Function compareVersions

packages/shared/src/versionUtils.ts:28–36  ·  view source on GitHub ↗
(a: Version, b: Version)

Source from the content-addressed store, hash-verified

26 * Returns < 0 if `a < b`, 0 if equal, > 0 if `a > b`.
27 */
28export const compareVersions = (a: Version, b: Version): number => {
29 if (a.major !== b.major) {
30 return a.major - b.major;
31 }
32 if (a.minor !== b.minor) {
33 return a.minor - b.minor;
34 }
35 return a.patch - b.patch;
36};

Callers 3

getUpgradeAvailabilityFunction · 0.85
tryGetLatestSourcebotTagFunction · 0.85
ChangelogEntryDialogFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected