1 var baseForOwn = require('./_baseForOwn'),
2 toFunction = require('./_toFunction');
5 * Iterates over own enumerable properties of an object invoking `iteratee`
6 * for each property. The iteratee is invoked with three arguments:
7 * (value, key, object). Iteratee functions may exit iteration early by
8 * explicitly returning `false`.
13 * @param {Object} object The object to iterate over.
14 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
15 * @returns {Object} Returns `object`.
23 * Foo.prototype.c = 3;
25 * _.forOwn(new Foo, function(value, key) {
28 * // => logs 'a' then 'b' (iteration order is not guaranteed)
30 function forOwn(object, iteratee) {
31 return object && baseForOwn(object, toFunction(iteratee));
34 module.exports = forOwn;