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:
34
react-app/node_modules/lodash/internal/composeArgs.js
generated
vendored
Normal file
34
react-app/node_modules/lodash/internal/composeArgs.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/* Native method references for those with the same name as other `lodash` methods. */
|
||||
var nativeMax = Math.max;
|
||||
|
||||
/**
|
||||
* Creates an array that is the composition of partially applied arguments,
|
||||
* placeholders, and provided arguments into a single array of arguments.
|
||||
*
|
||||
* @private
|
||||
* @param {Array|Object} args The provided arguments.
|
||||
* @param {Array} partials The arguments to prepend to those provided.
|
||||
* @param {Array} holders The `partials` placeholder indexes.
|
||||
* @returns {Array} Returns the new array of composed arguments.
|
||||
*/
|
||||
function composeArgs(args, partials, holders) {
|
||||
var holdersLength = holders.length,
|
||||
argsIndex = -1,
|
||||
argsLength = nativeMax(args.length - holdersLength, 0),
|
||||
leftIndex = -1,
|
||||
leftLength = partials.length,
|
||||
result = Array(leftLength + argsLength);
|
||||
|
||||
while (++leftIndex < leftLength) {
|
||||
result[leftIndex] = partials[leftIndex];
|
||||
}
|
||||
while (++argsIndex < holdersLength) {
|
||||
result[holders[argsIndex]] = args[argsIndex];
|
||||
}
|
||||
while (argsLength--) {
|
||||
result[leftIndex++] = args[argsIndex++];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
module.exports = composeArgs;
|
Reference in New Issue
Block a user