mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
lint files (#4416)
* lint files * added back arrow-paren and removed duplicate
This commit is contained in:
committed by
John-David Dalton
parent
5b4dc54465
commit
15e1557b2a
@@ -1,4 +1,4 @@
|
||||
import isIterateeCall from './isIterateeCall.js';
|
||||
import isIterateeCall from './isIterateeCall.js'
|
||||
|
||||
/**
|
||||
* Creates a function like `assign`.
|
||||
@@ -9,28 +9,28 @@ import isIterateeCall from './isIterateeCall.js';
|
||||
*/
|
||||
function createAssigner(assigner) {
|
||||
return (object, ...sources) => {
|
||||
let index = -1;
|
||||
let length = sources.length;
|
||||
let customizer = length > 1 ? sources[length - 1] : undefined;
|
||||
const guard = length > 2 ? sources[2] : undefined;
|
||||
let index = -1
|
||||
let length = sources.length
|
||||
let customizer = length > 1 ? sources[length - 1] : undefined
|
||||
const guard = length > 2 ? sources[2] : undefined
|
||||
|
||||
customizer = (assigner.length > 3 && typeof customizer == 'function')
|
||||
? (length--, customizer)
|
||||
: undefined;
|
||||
: undefined
|
||||
|
||||
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
||||
customizer = length < 3 ? undefined : customizer;
|
||||
length = 1;
|
||||
customizer = length < 3 ? undefined : customizer
|
||||
length = 1
|
||||
}
|
||||
object = Object(object);
|
||||
object = Object(object)
|
||||
while (++index < length) {
|
||||
const source = sources[index];
|
||||
const source = sources[index]
|
||||
if (source) {
|
||||
assigner(object, source, index, customizer);
|
||||
assigner(object, source, index, customizer)
|
||||
}
|
||||
}
|
||||
return object;
|
||||
};
|
||||
return object
|
||||
}
|
||||
}
|
||||
|
||||
export default createAssigner;
|
||||
export default createAssigner
|
||||
|
||||
Reference in New Issue
Block a user