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).
"asc"
"desc"
+1
-1
0
The sort order to resolve
+1 for an ascending order, -1 for a descending order, or 0 when order is zero
order
getOrderPrecedence for the precedence magnitude
Resolves an Order to its sort direction.
Maps the
"asc"and"desc"shorthands to+1and-1, and reduces a numeric order to the sign of its precedence:+1ascending,-1descending,0when the order is zero (ignored).