mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Remove baseIteratee and castFunction.
This commit is contained in:
@@ -19,16 +19,12 @@ const hasOwnProperty = objectProto.hasOwnProperty;
|
||||
* @since 0.1.0
|
||||
* @category Collection
|
||||
* @param {Array|Object} collection The collection to iterate over.
|
||||
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
|
||||
* @param {Function} iteratee The iteratee to transform keys.
|
||||
* @returns {Object} Returns the composed aggregate object.
|
||||
* @example
|
||||
*
|
||||
* _.groupBy([6.1, 4.2, 6.3], Math.floor);
|
||||
* // => { '4': [4.2], '6': [6.1, 6.3] }
|
||||
*
|
||||
* // The `_.property` iteratee shorthand.
|
||||
* _.groupBy(['one', 'two', 'three'], 'length');
|
||||
* // => { '3': ['one', 'two'], '5': ['three'] }
|
||||
*/
|
||||
const groupBy = createAggregator((result, value, key) => {
|
||||
if (hasOwnProperty.call(result, key)) {
|
||||
|
||||
Reference in New Issue
Block a user