index.js 345 B

123456789101112
  1. export default function assign(target, object) {
  2. if (target == null) {
  3. throw new TypeError('assign requires that input parameter not be null or undefined');
  4. }
  5. for (var property in object) {
  6. if (Object.prototype.hasOwnProperty.call(object, property)) {
  7. ;
  8. target[property] = object[property];
  9. }
  10. }
  11. return target;
  12. }