@edgible-team/sdk
    Preparing search index...

    Function compareSemver

    • Compare two x.y.z semantic versions numerically. Returns -1 if a < b, 1 if a > b, 0 if equal (e.g. 2.10.0 sorts above 2.9.0). Assumes the SEMVER shape the template/catalog schemas guarantee — missing components are treated as 0. Exported so consumers (webapp "update available" badge) share the renderer's ordering instead of re-implementing it.

      Parameters

      • a: string
      • b: string

      Returns number