Function compare

Compare function which adheres to MongoDB comparison order.

  • Type Parameters

    • T = unknown

    Parameters

    • a: T

      The first value

    • b: T

      The second value

    Returns number