3 var callable = require('./valid-callable')
4 , forEach = require('./for-each')
6 , call = Function.prototype.call;
8 module.exports = function (obj, cb/*, thisArg*/) {
9 var o = {}, thisArg = arguments[2];
11 forEach(obj, function (value, key, obj, index) {
12 if (call.call(cb, thisArg, value, key, obj, index)) o[key] = obj[key];