Files
lodash/internal/basePickBy.js
John-David Dalton 629caa8340 Bump to v4.0.1.
2016-01-24 19:21:52 -08:00

23 lines
563 B
JavaScript

define(['./baseForIn'], function(baseForIn) {
/**
* The base implementation of `_.pickBy` without support for iteratee shorthands.
*
* @private
* @param {Object} object The source object.
* @param {Function} predicate The function invoked per property.
* @returns {Object} Returns the new object.
*/
function basePickBy(object, predicate) {
var result = {};
baseForIn(object, function(value, key) {
if (predicate(value, key)) {
result[key] = value;
}
});
return result;
}
return basePickBy;
});