Files
lodash/internal/basePickBy.js
John-David Dalton 54e7baecc3 Bump to v4.0.0.
2016-01-12 00:17:29 -08:00

22 lines
517 B
JavaScript

import baseForIn from './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)) {
result[key] = value;
}
});
return result;
}
export default basePickBy;