index.js 499 B

123456789101112131415161718192021222324
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = assign;
  6. function assign(target, dirtyObject) {
  7. if (target == null) {
  8. throw new TypeError('assign requires that input parameter not be null or undefined');
  9. }
  10. dirtyObject = dirtyObject || {};
  11. for (var property in dirtyObject) {
  12. if (dirtyObject.hasOwnProperty(property)) {
  13. target[property] = dirtyObject[property];
  14. }
  15. }
  16. return target;
  17. }
  18. module.exports = exports.default;