Function compareIdentifiers

Compare two identifiers.

compareIdentifiers('3', '6') // -1
compareIdentifiers('s6g1', '6df4') // 1
  • Parameters

    • a: string | number

      first identifier

    • b: string | number

      second identifier

    Returns -1 | 0 | 1

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