Function gt

v1 > v2 This is true if v1 is greater than v2.

gt('1.2.3', '1.2.3') // false

build identifier ([+BUILD]) is not taken into account

  • Parameters

    • v1: string

      first version string

    • v2: string

      second version string

    • OptionaloptionsOrLoose: boolean | Options

      an options object { loose } (where loose is the only available option) or a boolean indicating whether to enable loose mode. In loose mode, the parser is more forgiving with imperfectly formatted semver strings

    Returns boolean

    true if v1 > v2, false if v1 <= v2