1 var baseForOwnRight = require('./_baseForOwnRight'),
2 castFunction = require('./_castFunction');
5 * This method is like `_.forOwn` except that it iterates over properties of
6 * `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`.
23 * Foo.prototype.c = 3;
25 * _.forOwnRight(new Foo, function(value, key) {
28 * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
30 function forOwnRight(object, iteratee) {
31 return object && baseForOwnRight(object, castFunction(iteratee));
34 module.exports = forOwnRight;