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:
36
react-app/node_modules/lodash/internal/composeArgsRight.js
generated
vendored
Normal file
36
react-app/node_modules/lodash/internal/composeArgsRight.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
/* Native method references for those with the same name as other `lodash` methods. */
|
||||
var nativeMax = Math.max;
|
||||
|
||||
/**
|
||||
* This function is like `composeArgs` except that the arguments composition
|
||||
* is tailored for `_.partialRight`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array|Object} args The provided arguments.
|
||||
* @param {Array} partials The arguments to append to those provided.
|
||||
* @param {Array} holders The `partials` placeholder indexes.
|
||||
* @returns {Array} Returns the new array of composed arguments.
|
||||
*/
|
||||
function composeArgsRight(args, partials, holders) {
|
||||
var holdersIndex = -1,
|
||||
holdersLength = holders.length,
|
||||
argsIndex = -1,
|
||||
argsLength = nativeMax(args.length - holdersLength, 0),
|
||||
rightIndex = -1,
|
||||
rightLength = partials.length,
|
||||
result = Array(argsLength + rightLength);
|
||||
|
||||
while (++argsIndex < argsLength) {
|
||||
result[argsIndex] = args[argsIndex];
|
||||
}
|
||||
var offset = argsIndex;
|
||||
while (++rightIndex < rightLength) {
|
||||
result[offset + rightIndex] = partials[rightIndex];
|
||||
}
|
||||
while (++holdersIndex < holdersLength) {
|
||||
result[offset + holders[holdersIndex]] = args[argsIndex++];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
module.exports = composeArgsRight;
|
Reference in New Issue
Block a user