mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Remove references to _.
This commit is contained in:
@@ -2,20 +2,19 @@ import baseOrderBy from './_baseOrderBy.js';
|
||||
import isArray from './isArray.js';
|
||||
|
||||
/**
|
||||
* This method is like `_.sortBy` except that it allows specifying the sort
|
||||
* This method is like `sortBy` except that it allows specifying the sort
|
||||
* orders of the iteratees to sort by. If `orders` is unspecified, all values
|
||||
* are sorted in ascending order. Otherwise, specify an order of "desc" for
|
||||
* descending or "asc" for ascending sort order of corresponding values.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Collection
|
||||
* @param {Array|Object} collection The collection to iterate over.
|
||||
* @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
|
||||
* @param {Array[]|Function[]|Object[]|string[]} [iteratees=[identity]]
|
||||
* The iteratees to sort by.
|
||||
* @param {string[]} [orders] The sort orders of `iteratees`.
|
||||
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
|
||||
* @param- {Object} [guard] Enables use as an iteratee for methods like `reduce`.
|
||||
* @returns {Array} Returns the new sorted array.
|
||||
* @example
|
||||
*
|
||||
@@ -27,7 +26,7 @@ import isArray from './isArray.js';
|
||||
* ];
|
||||
*
|
||||
* // Sort by `user` in ascending order and by `age` in descending order.
|
||||
* _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
|
||||
* orderBy(users, ['user', 'age'], ['asc', 'desc']);
|
||||
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
|
||||
*/
|
||||
function orderBy(collection, iteratees, orders, guard) {
|
||||
|
||||
Reference in New Issue
Block a user