mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
Update doc examples to ES2015.
This commit is contained in:
@@ -13,13 +13,13 @@ import createAggregator from './.internal/createAggregator.js';
|
||||
* @returns {Array} Returns the array of grouped elements.
|
||||
* @example
|
||||
*
|
||||
* var users = [
|
||||
* const users = [
|
||||
* { 'user': 'barney', 'age': 36, 'active': false },
|
||||
* { 'user': 'fred', 'age': 40, 'active': true },
|
||||
* { 'user': 'pebbles', 'age': 1, 'active': false }
|
||||
* ];
|
||||
*
|
||||
* partition(users, function(o) { return o.active; });
|
||||
* partition(users, o => o.active);
|
||||
* // => objects for [['fred'], ['barney', 'pebbles']]
|
||||
*/
|
||||
const partition = createAggregator((result, value, key) =>
|
||||
|
||||
Reference in New Issue
Block a user