linXiv frontend (TS/JS)
    Preparing search index...

    Function compareVersions

    • Compare two semver-ish strings: 1 if a is newer than b, -1 if older, 0 if equal or unparseable. Only the numeric major.minor.patch core ranks; a pre-release tag (1.2.0-rc1) ranks below the same core without one, and an unparseable component yields 0 so a malformed tag never reads as an update.

      Parameters

      • a: string
      • b: string

      Returns number