Merge pull request #96 from terinjokes/master

Fix a typo in the `_.groupBy` docs.

Former-commit-id: a5fb6f9769bb80d8bb6a0e2a176385a2f0d7fd83
This commit is contained in:
Kit Cambridge
2012-10-22 12:14:37 -07:00
2 changed files with 3 additions and 3 deletions

View File

@@ -996,7 +996,7 @@ _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, alert);
### <a id="_groupbycollection-callbackproperty--thisarg"></a>`_.groupBy(collection, callback|property [, thisArg])`
<a href="#_groupbycollection-callbackproperty--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2017 "View in source") [&#x24C9;][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
1. `collection` *(Array|Object|String)*: The collection to iterate over.
@@ -3084,4 +3084,4 @@ _.uniqueId('contact_');
<!-- /div -->
[1]: #Arrays "Jump back to the TOC."
[1]: #Arrays "Jump back to the TOC."

View File

@@ -1993,7 +1993,7 @@
* `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').
* The `callback` argument may also be the name of a property to group by (e.g. 'length').
*
* @static
* @memberOf _