Function compare

  • Checks whether x is a comparable type and returns the result of x.compare(y). Otherwise the return value of the compare function is equivalent to obj === other ? 0 : obj < other ? -1 : 1

    Returns

    The comparison result

    See

    Parameters

    • x: any

      An initial value

    • y: any

      Other value to compare

    Returns number

Generated using TypeDoc