@thruputchain/client
    Preparing search index...

    Function majorVersionFromSemver

    • The major-version domain a semver string belongs to.

      Mirrors the Rust SDK's major_version_from_string: a zero major or minor is not a stable domain on its own, so the domain widens until it is.

      • 1.2.3 → 1
      • 0.9.2 → 0.9
      • 0.0.2 → 0.0.2

      Parameters

      • versionStr: string

      Returns string

      If versionStr has fewer than three dot-separated components.