source: trip-planner-front/node_modules/@babel/runtime/helpers/esm/objectSpread2.js

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: 1.0 KB
Line 
1import defineProperty from "./defineProperty.js";
2
3function ownKeys(object, enumerableOnly) {
4 var keys = Object.keys(object);
5
6 if (Object.getOwnPropertySymbols) {
7 var symbols = Object.getOwnPropertySymbols(object);
8
9 if (enumerableOnly) {
10 symbols = symbols.filter(function (sym) {
11 return Object.getOwnPropertyDescriptor(object, sym).enumerable;
12 });
13 }
14
15 keys.push.apply(keys, symbols);
16 }
17
18 return keys;
19}
20
21export default function _objectSpread2(target) {
22 for (var i = 1; i < arguments.length; i++) {
23 var source = arguments[i] != null ? arguments[i] : {};
24
25 if (i % 2) {
26 ownKeys(Object(source), true).forEach(function (key) {
27 defineProperty(target, key, source[key]);
28 });
29 } else if (Object.getOwnPropertyDescriptors) {
30 Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
31 } else {
32 ownKeys(Object(source)).forEach(function (key) {
33 Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
34 });
35 }
36 }
37
38 return target;
39}
Note: See TracBrowser for help on using the repository browser.