mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 10:17:48 +00:00
Another cleanup pass on createAssigner.
This commit is contained in:
@@ -3168,17 +3168,22 @@
|
|||||||
if (length < 2 || object == null) {
|
if (length < 2 || object == null) {
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
if (length > 3 && typeof args[length - 2] == 'function') {
|
var customizer = args[length - 2],
|
||||||
var index = (length -= 2);
|
thisArg = args[length - 1],
|
||||||
} else if (length > 2 && typeof args[length - 1] == 'function') {
|
guard = args[3];
|
||||||
index = --length;
|
|
||||||
|
if (length > 3 && typeof customizer == 'function') {
|
||||||
|
customizer = bindCallback(customizer, thisArg, 5);
|
||||||
|
length -= 2;
|
||||||
|
} else {
|
||||||
|
customizer = (length > 2 && typeof thisArg == 'function') ? thisArg : null;
|
||||||
|
length -= (customizer ? 1 : 0);
|
||||||
}
|
}
|
||||||
var customizer = index && bindCallback(args[index], args[index + 1], 5);
|
if (guard && isIterateeCall(args[1], args[2], guard)) {
|
||||||
if (length > 3 && isIterateeCall(args[1], args[2], args[3])) {
|
customizer = length == 3 ? null : customizer;
|
||||||
length = 2;
|
length = 2;
|
||||||
customizer = index === 3 ? null : customizer;
|
|
||||||
}
|
}
|
||||||
index = 0;
|
var index = 0;
|
||||||
while (++index < length) {
|
while (++index < length) {
|
||||||
var source = args[index];
|
var source = args[index];
|
||||||
if (source) {
|
if (source) {
|
||||||
|
|||||||
Reference in New Issue
Block a user