index.js 954 B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * lodash 3.0.1 (Custom Build) <https://lodash.com/>
  3. * Build: `lodash modern modularize exports="npm" -o ./`
  4. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  5. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  6. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  7. * Available under MIT license <https://lodash.com/license>
  8. */
  9. /**
  10. * Copies properties of `source` to `object`.
  11. *
  12. * @private
  13. * @param {Object} source The object to copy properties from.
  14. * @param {Array} props The property names to copy.
  15. * @param {Object} [object={}] The object to copy properties to.
  16. * @returns {Object} Returns `object`.
  17. */
  18. function baseCopy(source, props, object) {
  19. object || (object = {});
  20. var index = -1,
  21. length = props.length;
  22. while (++index < length) {
  23. var key = props[index];
  24. object[key] = source[key];
  25. }
  26. return object;
  27. }
  28. module.exports = baseCopy;