Add _.partialRight and make _.assign and _.defaults work with arrays.

Former-commit-id: 6d9fea855de53e9ccb5ac6f58db68239ef08e9de
This commit is contained in:
John-David Dalton
2013-01-19 22:17:14 -08:00
parent 39fc839ff2
commit 873cc63f94
9 changed files with 419 additions and 371 deletions

View File

@@ -140,6 +140,7 @@
'memoize',
'once',
'partial',
'partialRight',
'throttle',
'wrap'
];
@@ -257,7 +258,8 @@
'forOwn',
'isPlainObject',
'merge',
'partial'
'partial',
'partialRight'
]));
/*--------------------------------------------------------------------------*/
@@ -413,7 +415,7 @@
func({ 'noop': noop });
} else if (methodName == 'bindKey') {
func(lodash, 'identity', array, string);
} else if (/^(?:bind|partial)$/.test(methodName)) {
} else if (/^(?:bind|partial(?:Right)?)$/.test(methodName)) {
func(noop, object, array, string);
} else if (/^(?:compose|memoize|wrap)$/.test(methodName)) {
func(noop, noop);
@@ -794,7 +796,8 @@
'forOwn',
'isPlainObject',
'merge',
'partial'
'partial',
'partialRight'
], function(methodName) {
equal(lodash[methodName], undefined, '_.' + methodName + ' should not exist: ' + basename);
});