mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Merge pull request #96 from terinjokes/master
Fix a typo in the `_.groupBy` docs. Former-commit-id: a5fb6f9769bb80d8bb6a0e2a176385a2f0d7fd83
This commit is contained in:
@@ -996,7 +996,7 @@ _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, alert);
|
|||||||
### <a id="_groupbycollection-callbackproperty--thisarg"></a>`_.groupBy(collection, callback|property [, thisArg])`
|
### <a id="_groupbycollection-callbackproperty--thisarg"></a>`_.groupBy(collection, callback|property [, thisArg])`
|
||||||
<a href="#_groupbycollection-callbackproperty--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2017 "View in source") [Ⓣ][1]
|
<a href="#_groupbycollection-callbackproperty--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2017 "View in source") [Ⓣ][1]
|
||||||
|
|
||||||
Creates an object composed of keys returned from running each element of `collection` through a `callback`. The corresponding value of each key is an array of elements passed to `callback` that returned the key. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to count by *(e.g. 'length')*.
|
Creates an object composed of keys returned from running each element of `collection` through a `callback`. The corresponding value of each key is an array of elements passed to `callback` that returned the key. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. The `callback` argument may also be the name of a property to group by *(e.g. 'length')*.
|
||||||
|
|
||||||
#### Arguments
|
#### Arguments
|
||||||
1. `collection` *(Array|Object|String)*: The collection to iterate over.
|
1. `collection` *(Array|Object|String)*: The collection to iterate over.
|
||||||
|
|||||||
@@ -1993,7 +1993,7 @@
|
|||||||
* `collection` through a `callback`. The corresponding value of each key is an
|
* `collection` through a `callback`. The corresponding value of each key is an
|
||||||
* array of elements passed to `callback` that returned the key. The `callback`
|
* array of elements passed to `callback` that returned the key. The `callback`
|
||||||
* is bound to `thisArg` and invoked with three arguments; (value, index|key, collection).
|
* is bound to `thisArg` and invoked with three arguments; (value, index|key, collection).
|
||||||
* The `callback` argument may also be the name of a property to count by (e.g. 'length').
|
* The `callback` argument may also be the name of a property to group by (e.g. 'length').
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
|
|||||||
Reference in New Issue
Block a user