_object_spread.js 915 B

1234567891011121314151617181920212223242526
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = _objectSpread;
  6. var _definePropertyMjs = _interopRequireDefault(require("./_define_property.js"));
  7. function _objectSpread(target) {
  8. for(var i = 1; i < arguments.length; i++){
  9. var source = arguments[i] != null ? arguments[i] : {};
  10. var ownKeys = Object.keys(source);
  11. if (typeof Object.getOwnPropertySymbols === 'function') {
  12. ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
  13. return Object.getOwnPropertyDescriptor(source, sym).enumerable;
  14. }));
  15. }
  16. ownKeys.forEach(function(key) {
  17. (0, _definePropertyMjs).default(target, key, source[key]);
  18. });
  19. }
  20. return target;
  21. }
  22. function _interopRequireDefault(obj) {
  23. return obj && obj.__esModule ? obj : {
  24. default: obj
  25. };
  26. }