@metreeca/qest - v0.10.0
    Preparing search index...

    Function getOrderDirection

    • Resolves an Order to its sort direction.

      Maps the "asc" and "desc" shorthands to +1 and -1, and reduces a numeric order to the sign of its precedence: +1 ascending, -1 descending, 0 when the order is zero (ignored).

      Parameters

      • order: Order

        The sort order to resolve

      Returns number

      +1 for an ascending order, -1 for a descending order, or 0 when order is zero

      getOrderPrecedence for the precedence magnitude