* This method is like `_.forIn` except that it iterates over elements * of a `collection` in the opposite order. * * @static * @memberOf _ * @category Objects * @param {Object} object The object to iterate over. * @param {Function} [callback=identity] The function
(object, callback, thisArg)
| 37188 | * // => logs 'move', 'y', and 'x' assuming `_.forIn ` logs 'x', 'y', and 'move' |
| 37189 | */ |
| 37190 | function forInRight(object, callback, thisArg) { |
| 37191 | var pairs = []; |
| 37192 | |
| 37193 | forIn(object, function(value, key) { |
| 37194 | pairs.push(key, value); |
| 37195 | }); |
| 37196 | |
| 37197 | var length = pairs.length; |
| 37198 | callback = baseCreateCallback(callback, thisArg, 3); |
| 37199 | while (length--) { |
| 37200 | if (callback(pairs[length--], pairs[length], object) === false) { |
| 37201 | break; |
| 37202 | } |
| 37203 | } |
| 37204 | return object; |
| 37205 | } |
| 37206 | |
| 37207 | /** |
| 37208 | * Iterates over own enumerable properties of an object, executing the callback |
nothing calls this directly
no test coverage detected