* This method is like `_.sortByAll` except that it allows specifying the * sort orders of the iteratees to sort by. A truthy value in `orders` will * sort the corresponding property name in ascending order while a falsey * value will sort it in descending order. * * If a pro
(collection, iteratees, orders, guard)
| 8691 | * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] |
| 8692 | */ |
| 8693 | function sortByOrder(collection, iteratees, orders, guard) { |
| 8694 | if (collection == null) { |
| 8695 | return []; |
| 8696 | } |
| 8697 | if (guard && isIterateeCall(iteratees, orders, guard)) { |
| 8698 | orders = null; |
| 8699 | } |
| 8700 | if (!isArray(iteratees)) { |
| 8701 | iteratees = iteratees == null ? [] : [iteratees]; |
| 8702 | } |
| 8703 | if (!isArray(orders)) { |
| 8704 | orders = orders == null ? [] : [orders]; |
| 8705 | } |
| 8706 | return baseSortByOrder(collection, iteratees, orders); |
| 8707 | } |
| 8708 | |
| 8709 | /** |
| 8710 | * Performs a deep comparison between each element in `collection` and the |
nothing calls this directly
no test coverage detected