extend.js 311 B

1234567891011121314
  1. export default function(destination, source) {
  2. destination = destination || {};
  3. var value, property;
  4. if (!source) {
  5. return destination;
  6. }
  7. for (property in source) {
  8. value = source[property];
  9. if (value !== undefined) {
  10. destination[property] = value;
  11. }
  12. }
  13. return destination;
  14. }