mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
Bump to v3.4.0.
This commit is contained in:
@@ -11,24 +11,31 @@ import isIterateeCall from './isIterateeCall';
|
||||
*/
|
||||
function createAssigner(assigner) {
|
||||
return function() {
|
||||
var length = arguments.length,
|
||||
object = arguments[0];
|
||||
var args = arguments,
|
||||
length = args.length,
|
||||
object = args[0];
|
||||
|
||||
if (length < 2 || object == null) {
|
||||
return object;
|
||||
}
|
||||
if (length > 3 && isIterateeCall(arguments[1], arguments[2], arguments[3])) {
|
||||
length = 2;
|
||||
var customizer = args[length - 2],
|
||||
thisArg = args[length - 1],
|
||||
guard = args[3];
|
||||
|
||||
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);
|
||||
}
|
||||
// Juggle arguments.
|
||||
if (length > 3 && typeof arguments[length - 2] == 'function') {
|
||||
var customizer = bindCallback(arguments[--length - 1], arguments[length--], 5);
|
||||
} else if (length > 2 && typeof arguments[length - 1] == 'function') {
|
||||
customizer = arguments[--length];
|
||||
if (guard && isIterateeCall(args[1], args[2], guard)) {
|
||||
customizer = length == 3 ? null : customizer;
|
||||
length = 2;
|
||||
}
|
||||
var index = 0;
|
||||
while (++index < length) {
|
||||
var source = arguments[index];
|
||||
var source = args[index];
|
||||
if (source) {
|
||||
assigner(object, source, customizer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user