• File: _baseZipObject.js
  • Full Path: /var/www/nodejs/callDir/node_modules/lodash/_baseZipObject.js
  • Date Modified: 06/03/2024 5:11 PM
  • File size: 660 bytes
  • MIME-type: text/plain
  • Charset: utf-8
/**
 * 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;