mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
Apply even more let/const transforms.
This commit is contained in:
@@ -2,10 +2,10 @@ import baseAssignValue from './_baseAssignValue.js';
|
||||
import createAggregator from './_createAggregator.js';
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
const objectProto = Object.prototype;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
const hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/**
|
||||
* Creates an object composed of keys generated from the results of running
|
||||
@@ -30,7 +30,7 @@ var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
* _.groupBy(['one', 'two', 'three'], 'length');
|
||||
* // => { '3': ['one', 'two'], '5': ['three'] }
|
||||
*/
|
||||
var groupBy = createAggregator((result, value, key) => {
|
||||
const groupBy = createAggregator((result, value, key) => {
|
||||
if (hasOwnProperty.call(result, key)) {
|
||||
result[key].push(value);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user