1 var baseFor = require('./_baseFor'),
2 castFunction = require('./_castFunction'),
3 keysIn = require('./keysIn');
6 * Iterates over own and inherited enumerable string keyed properties of an
7 * object and invokes `iteratee` for each property. The iteratee is invoked
8 * with three arguments: (value, key, object). Iteratee functions may exit
9 * iteration early by explicitly returning `false`.
15 * @param {Object} object The object to iterate over.
16 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
17 * @returns {Object} Returns `object`.
26 * Foo.prototype.c = 3;
28 * _.forIn(new Foo, function(value, key) {
31 * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
33 function forIn(object, iteratee) {
36 : baseFor(object, castFunction(iteratee), keysIn);
39 module.exports = forIn;