mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-14 12:47:49 +00:00
Ensure fp.mergeAllWith accepts more than 2 sources. [closes #2786]
This commit is contained in:
@@ -172,9 +172,9 @@ exports.iterateeRearg = {
|
||||
|
||||
/** Used to map method names to rearg configs. */
|
||||
exports.methodRearg = {
|
||||
'assignInAllWith': [1, 2, 0],
|
||||
'assignInAllWith': [1, 0],
|
||||
'assignInWith': [1, 2, 0],
|
||||
'assignAllWith': [1, 2, 0],
|
||||
'assignAllWith': [1, 0],
|
||||
'assignWith': [1, 2, 0],
|
||||
'differenceBy': [1, 2, 0],
|
||||
'differenceWith': [1, 2, 0],
|
||||
@@ -183,7 +183,7 @@ exports.methodRearg = {
|
||||
'intersectionWith': [1, 2, 0],
|
||||
'isEqualWith': [1, 2, 0],
|
||||
'isMatchWith': [2, 1, 0],
|
||||
'mergeAllWith': [1, 2, 0],
|
||||
'mergeAllWith': [1, 0],
|
||||
'mergeWith': [1, 2, 0],
|
||||
'padChars': [2, 1, 0],
|
||||
'padCharsEnd': [2, 1, 0],
|
||||
@@ -206,15 +206,15 @@ exports.methodRearg = {
|
||||
/** Used to map method names to spread configs. */
|
||||
exports.methodSpread = {
|
||||
'assignAll': { 'start': 0 },
|
||||
'assignAllWith': { 'afterRearg': true, 'start': 1 },
|
||||
'assignAllWith': { 'start': 0 },
|
||||
'assignInAll': { 'start': 0 },
|
||||
'assignInAllWith': { 'afterRearg': true, 'start': 1 },
|
||||
'assignInAllWith': { 'start': 0 },
|
||||
'defaultsAll': { 'start': 0 },
|
||||
'defaultsDeepAll': { 'start': 0 },
|
||||
'invokeArgs': { 'start': 2 },
|
||||
'invokeArgsMap': { 'start': 2 },
|
||||
'mergeAll': { 'start': 0 },
|
||||
'mergeAllWith': { 'afterRearg': true, 'start': 1 },
|
||||
'mergeAllWith': { 'start': 0 },
|
||||
'partial': { 'start': 1 },
|
||||
'partialRight': { 'start': 1 },
|
||||
'without': { 'start': 1 },
|
||||
|
||||
@@ -10822,6 +10822,7 @@
|
||||
if (array) {
|
||||
arrayPush(otherArgs, array);
|
||||
}
|
||||
arrayPush(otherArgs, castSlice(args, start + 1));
|
||||
return apply(func, this, otherArgs);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -20866,8 +20866,8 @@
|
||||
args = slice.call(arguments);
|
||||
});
|
||||
|
||||
spread([4, 2], 'ignored');
|
||||
assert.deepEqual(args, [4, 2]);
|
||||
spread([1, 2], 3);
|
||||
assert.deepEqual(args, [1, 2, 3]);
|
||||
});
|
||||
|
||||
QUnit.test('should work with `start`', function(assert) {
|
||||
|
||||
Reference in New Issue
Block a user