mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Apply arrow function transform.
This commit is contained in:
@@ -25,13 +25,9 @@ function pickBy(object, predicate) {
|
||||
if (object == null) {
|
||||
return {};
|
||||
}
|
||||
var props = arrayMap(getAllKeysIn(object), function(prop) {
|
||||
return [prop];
|
||||
});
|
||||
var props = arrayMap(getAllKeysIn(object), prop => [prop]);
|
||||
predicate = baseIteratee(predicate);
|
||||
return basePickBy(object, props, function(value, path) {
|
||||
return predicate(value, path[0]);
|
||||
});
|
||||
return basePickBy(object, props, (value, path) => predicate(value, path[0]));
|
||||
}
|
||||
|
||||
export default pickBy;
|
||||
|
||||
Reference in New Issue
Block a user