Security update for permissions_by_term
[yaffs-website] / node_modules / uncss / node_modules / lodash / forInRight.js
1 var baseForRight = require('./internal/baseForRight'),
2     keysIn = require('./keysIn'),
3     toFunction = require('./internal/toFunction');
4
5 /**
6  * This method is like `_.forIn` except that it iterates over properties of
7  * `object` in the opposite order.
8  *
9  * @static
10  * @memberOf _
11  * @category Object
12  * @param {Object} object The object to iterate over.
13  * @param {Function} [iteratee=_.identity] The function invoked per iteration.
14  * @returns {Object} Returns `object`.
15  * @example
16  *
17  * function Foo() {
18  *   this.a = 1;
19  *   this.b = 2;
20  * }
21  *
22  * Foo.prototype.c = 3;
23  *
24  * _.forInRight(new Foo, function(value, key) {
25  *   console.log(key);
26  * });
27  * // => logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'
28  */
29 function forInRight(object, iteratee) {
30   return object == null ? object : baseForRight(object, toFunction(iteratee), keysIn);
31 }
32
33 module.exports = forInRight;