1 var baseForRight = require('./_baseForRight'),
2 keysIn = require('./keysIn'),
3 toFunction = require('./_toFunction');
6 * This method is like `_.forIn` except that it iterates over properties of
7 * `object` in the opposite order.
12 * @param {Object} object The object to iterate over.
13 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
14 * @returns {Object} Returns `object`.
22 * Foo.prototype.c = 3;
24 * _.forInRight(new Foo, function(value, key) {
27 * // => logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'
29 function forInRight(object, iteratee) {
30 return object == null ? object : baseForRight(object, toFunction(iteratee), keysIn);
33 module.exports = forInRight;