* Creates an object composed of the `object` properties `predicate` returns * truthy for. The predicate is invoked with two arguments: (value, key). * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The source object. * @para
(object, predicate)
| 13678 | * // => { 'a': 1, 'c': 3 } |
| 13679 | */ |
| 13680 | function pickBy(object, predicate) { |
| 13681 | if (object == null) { |
| 13682 | return {}; |
| 13683 | } |
| 13684 | var props = arrayMap(getAllKeysIn(object), function(prop) { |
| 13685 | return [prop]; |
| 13686 | }); |
| 13687 | predicate = getIteratee(predicate); |
| 13688 | return basePickBy(object, props, function(value, path) { |
| 13689 | return predicate(value, path[0]); |
| 13690 | }); |
| 13691 | } |
| 13692 | |
| 13693 | /** |
| 13694 | * This method is like `_.get` except that if the resolved value is a |
no test coverage detected