def06b90cd28bdc122871412bac006257da1d445e0b5eed47348cd6ce04ddcb2013828563034e58a605561e2ec996aad43c014bac5799e473d46216d4f98fd 660 B

1234567891011121314151617181920212223
  1. /**
  2. * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
  3. *
  4. * @private
  5. * @param {Array} props The property identifiers.
  6. * @param {Array} values The property values.
  7. * @param {Function} assignFunc The function to assign values.
  8. * @returns {Object} Returns the new object.
  9. */
  10. function baseZipObject(props, values, assignFunc) {
  11. var index = -1,
  12. length = props.length,
  13. valsLength = values.length,
  14. result = {};
  15. while (++index < length) {
  16. var value = index < valsLength ? values[index] : undefined;
  17. assignFunc(result, props[index], value);
  18. }
  19. return result;
  20. }
  21. module.exports = baseZipObject;