added _.forOwnRight definitions

This commit is contained in:
Brian Zengel
2013-10-20 12:36:18 -04:00
parent 6647bd5b27
commit 4061027995
2 changed files with 17 additions and 0 deletions
+4
View File
@@ -574,6 +574,10 @@ _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
console.log(key);
});
_.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
console.log(key);
});
var mergeNames = {
'stooges': [
{ 'name': 'moe' },
+13
View File
@@ -2304,6 +2304,19 @@ declare module _ {
callback?: ObjectIterator<T, void>,
thisArg?: any): Dictionary<T>;
/**
* This method is like _.forOwn except that it iterates over elements of a collection in the
* opposite order.
* @param object The object to iterate over.
* @param callback The function called per iteration.
* @param thisArg The this binding of callback.
* @return object
**/
export function forOwnRight<T extends {}>(
object: Dictionary<T>,
callback?: ObjectIterator<T, void>,
thisArg?: any): Dictionary<T>;
/**
* Recursively merges own enumerable properties of the source object(s), that don't resolve