Initial commit
[yaffs-website] / node_modules / grunt-contrib-watch / node_modules / globule / node_modules / lodash / _basePickBy.js
1 var baseAssignValue = require('./_baseAssignValue');
2
3 /**
4  * The base implementation of  `_.pickBy` without support for iteratee shorthands.
5  *
6  * @private
7  * @param {Object} object The source object.
8  * @param {string[]} props The property identifiers to pick from.
9  * @param {Function} predicate The function invoked per property.
10  * @returns {Object} Returns the new object.
11  */
12 function basePickBy(object, props, predicate) {
13   var index = -1,
14       length = props.length,
15       result = {};
16
17   while (++index < length) {
18     var key = props[index],
19         value = object[key];
20
21     if (predicate(value, key)) {
22       baseAssignValue(result, key, value);
23     }
24   }
25   return result;
26 }
27
28 module.exports = basePickBy;