mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Apply more let/const transforms.
This commit is contained in:
@@ -12,14 +12,13 @@ import castPath from './_castPath.js';
|
||||
* @returns {Object} Returns the new object.
|
||||
*/
|
||||
function basePickBy(object, paths, predicate) {
|
||||
var index = -1,
|
||||
length = paths.length,
|
||||
result = {};
|
||||
let index = -1;
|
||||
const length = paths.length;
|
||||
const result = {};
|
||||
|
||||
while (++index < length) {
|
||||
var path = paths[index],
|
||||
value = baseGet(object, path);
|
||||
|
||||
const path = paths[index];
|
||||
const value = baseGet(object, path);
|
||||
if (predicate(value, path)) {
|
||||
baseSet(result, castPath(path, object), value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user