main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
612 bytes
|
Rev | Line | |
---|
[d24f17c] | 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 | if (typeof Object.getOwnPropertySymbols === 'function') {
|
---|
| 7 | ownKeys.push.apply(ownKeys, 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 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.