Front end of the Slack clone application.

assign.js 505B

12345678910111213141516171819
  1. import { root } from './root';
  2. export function assignImpl(target, ...sources) {
  3. const len = sources.length;
  4. for (let i = 0; i < len; i++) {
  5. const source = sources[i];
  6. for (let k in source) {
  7. if (source.hasOwnProperty(k)) {
  8. target[k] = source[k];
  9. }
  10. }
  11. }
  12. return target;
  13. }
  14. ;
  15. export function getAssign(root) {
  16. return root.Object.assign || assignImpl;
  17. }
  18. export const assign = getAssign(root);
  19. //# sourceMappingURL=assign.js.map