Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
612 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | import defineProperty from "./defineProperty.js";
|
---|
| 2 | export default function _objectSpread(target) {
|
---|
| 3 | for (var i = 1; i < arguments.length; i++) {
|
---|
| 4 | var source = arguments[i] != null ? Object(arguments[i]) : {};
|
---|
| 5 | var ownKeys = Object.keys(source);
|
---|
| 6 |
|
---|
| 7 | if (typeof Object.getOwnPropertySymbols === 'function') {
|
---|
| 8 | ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
---|
| 9 | return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
---|
| 10 | }));
|
---|
| 11 | }
|
---|
| 12 |
|
---|
| 13 | ownKeys.forEach(function (key) {
|
---|
| 14 | defineProperty(target, key, source[key]);
|
---|
| 15 | });
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | return target;
|
---|
| 19 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.