mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
react app
This commit is contained in:
41
react-app/node_modules/lodash/internal/createAssigner.js
generated
vendored
Normal file
41
react-app/node_modules/lodash/internal/createAssigner.js
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
var bindCallback = require('./bindCallback'),
|
||||
isIterateeCall = require('./isIterateeCall'),
|
||||
restParam = require('../function/restParam');
|
||||
|
||||
/**
|
||||
* Creates a `_.assign`, `_.defaults`, or `_.merge` function.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} assigner The function to assign values.
|
||||
* @returns {Function} Returns the new assigner function.
|
||||
*/
|
||||
function createAssigner(assigner) {
|
||||
return restParam(function(object, sources) {
|
||||
var index = -1,
|
||||
length = object == null ? 0 : sources.length,
|
||||
customizer = length > 2 ? sources[length - 2] : undefined,
|
||||
guard = length > 2 ? sources[2] : undefined,
|
||||
thisArg = length > 1 ? sources[length - 1] : undefined;
|
||||
|
||||
if (typeof customizer == 'function') {
|
||||
customizer = bindCallback(customizer, thisArg, 5);
|
||||
length -= 2;
|
||||
} else {
|
||||
customizer = typeof thisArg == 'function' ? thisArg : undefined;
|
||||
length -= (customizer ? 1 : 0);
|
||||
}
|
||||
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
||||
customizer = length < 3 ? undefined : customizer;
|
||||
length = 1;
|
||||
}
|
||||
while (++index < length) {
|
||||
var source = sources[index];
|
||||
if (source) {
|
||||
assigner(object, source, customizer);
|
||||
}
|
||||
}
|
||||
return object;
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = createAssigner;
|
Reference in New Issue
Block a user