Function compareLoose

Compare with loose mode enabled

compareLoose('1.2.3', '1.2.3') // 0

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

  • Parameters

    • v1: string

      first version string

    • v2: string

      second version string

    Returns -1 | 0 | 1

    • 0 if v1 == v2
    • 1 if v1 > v2
    • -1 if v1 < v2