Urara-Blog/node_modules/.pnpm-store/v3/files/bf/def06b90cd28bdc122871412bac006257da1d445e0b5eed47348cd6ce04ddcb2013828563034e58a605561e2ec996aad43c014bac5799e473d46216d4f98fd
2022-08-14 01:14:53 +08:00

23 lines
660 B
Text

/**
* This base implementation of `_.zipObject` which assigns values using `assignFunc`.
*
* @private
* @param {Array} props The property identifiers.
* @param {Array} values The property values.
* @param {Function} assignFunc The function to assign values.
* @returns {Object} Returns the new object.
*/
function baseZipObject(props, values, assignFunc) {
var index = -1,
length = props.length,
valsLength = values.length,
result = {};
while (++index < length) {
var value = index < valsLength ? values[index] : undefined;
assignFunc(result, props[index], value);
}
return result;
}
module.exports = baseZipObject;