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