611859eff18f27c0325579357820e5dbc6a800ce
[yaffs-website] / node_modules / grunt-legacy-log-utils / node_modules / lodash / pickBy.js
1 var baseIteratee = require('./_baseIteratee'),
2     basePickBy = require('./_basePickBy');
3
4 /**
5  * Creates an object composed of the `object` properties `predicate` returns
6  * truthy for. The predicate is invoked with two arguments: (value, key).
7  *
8  * @static
9  * @memberOf _
10  * @category Object
11  * @param {Object} object The source object.
12  * @param {Function|Object|string} [predicate=_.identity] The function invoked per property.
13  * @returns {Object} Returns the new object.
14  * @example
15  *
16  * var object = { 'a': 1, 'b': '2', 'c': 3 };
17  *
18  * _.pickBy(object, _.isNumber);
19  * // => { 'a': 1, 'c': 3 }
20  */
21 function pickBy(object, predicate) {
22   return object == null ? {} : basePickBy(object, baseIteratee(predicate, 2));
23 }
24
25 module.exports = pickBy;