mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Continue to use more ES2015.
This commit is contained in:
@@ -36,8 +36,7 @@ import createAggregator from './_createAggregator.js';
|
||||
* _.partition(users, 'active');
|
||||
* // => objects for [['fred'], ['barney', 'pebbles']]
|
||||
*/
|
||||
var partition = createAggregator(function(result, value, key) {
|
||||
result[key ? 0 : 1].push(value);
|
||||
}, function() { return [[], []]; });
|
||||
const partition = createAggregator((result, value, key) =>
|
||||
result[key ? 0 : 1].push(value), () => [[], []]);
|
||||
|
||||
export default partition;
|
||||
|
||||
Reference in New Issue
Block a user