function normalizeOrders(orders) {
    if (orders === undefined) {
        return undefined;
    }
    const convert = (order) => {
        if (["desc", false].includes(order)) {
            return "desc";
        }
        return "asc";
    };
    return Array.isArray(orders) ? orders.map(convert) : convert(orders);
}
Adapt order directions array to @{lodash.orderBy} API.

@private

@param {Array<Boolean|'asc'|'desc'>} orders? - an array of optional order query directions as provided to {@Link {QuerySet.orderBy}}
@return {Array<'asc'|'desc'>|undefined} A normalized ordering array or undefined if none was provided.