mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Cleanup docs.
Former-commit-id: 346b2f7c55e3d0eb3b86f19c05fa9964f998b483
This commit is contained in:
@@ -635,11 +635,11 @@
|
||||
* @returns {Array|Object} Returns the `collection`.
|
||||
* @example
|
||||
*
|
||||
* _([1, 2, 3]).forEach(function(num) { alert(num); }).join(',');
|
||||
* // => alerts each number in turn and returns "1,2,3"
|
||||
*
|
||||
* _.forEach({ 'one': 1, 'two': 2, 'three': 3}, function(num) { alert(num); });
|
||||
* // => alerts each number in turn
|
||||
*
|
||||
* _([1, 2, 3]).forEach(function(num) { alert(num); }).join(',');
|
||||
* // => alerts each number in turn and returns "1,2,3"
|
||||
*/
|
||||
var forEach = createIterator(baseIteratorOptions, {
|
||||
'top': 'if (thisArg) callback = bind(callback, thisArg)'
|
||||
@@ -664,6 +664,9 @@
|
||||
* _.groupBy([1.3, 2.1, 2.4], function(num) { return Math.floor(num); });
|
||||
* // => { '1': [1.3], '2': [2.1, 2.4] }
|
||||
*
|
||||
* _.groupBy([1.3, 2.1, 2.4], function(num) { return this.floor(num); }, Math);
|
||||
* // => { '1': [1.3], '2': [2.1, 2.4] }
|
||||
*
|
||||
* _.groupBy(['one', 'two', 'three'], 'length');
|
||||
* // => { '3': ['one', 'two'], '5': ['three'] }
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user