Front end of the Slack clone application.

123456789101112131415161718192021222324
  1. /**
  2. * Merge object b with object a.
  3. *
  4. * var a = { foo: 'bar' }
  5. * , b = { bar: 'baz' };
  6. *
  7. * merge(a, b);
  8. * // => { foo: 'bar', bar: 'baz' }
  9. *
  10. * @param {Object} a
  11. * @param {Object} b
  12. * @return {Object}
  13. * @api public
  14. */
  15. exports = module.exports = function(a, b){
  16. if (a && b) {
  17. for (var key in b) {
  18. a[key] = b[key];
  19. }
  20. }
  21. return a;
  22. };