You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
609 B

4 years ago
  1. import defineProperty from "./defineProperty";
  2. export default function _objectSpread(target) {
  3. for (var i = 1; i < arguments.length; i++) {
  4. var source = arguments[i] != null ? arguments[i] : {};
  5. var ownKeys = Object.keys(Object(source));
  6. if (typeof Object.getOwnPropertySymbols === 'function') {
  7. ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
  8. return Object.getOwnPropertyDescriptor(source, sym).enumerable;
  9. }));
  10. }
  11. ownKeys.forEach(function (key) {
  12. defineProperty(target, key, source[key]);
  13. });
  14. }
  15. return target;
  16. }