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