Sha256: 0b15f020821f65b787c96c2df1a123fddc9fd31f68abdba575e03c44420f44b3

Contents?: true

Size: 1.01 KB

Versions: 12

Compression:

Stored size: 1.01 KB

Contents

import defineProperty from "./defineProperty";

function ownKeys(object, enumerableOnly) {
  var keys = Object.keys(object);

  if (Object.getOwnPropertySymbols) {
    var symbols = Object.getOwnPropertySymbols(object);
    if (enumerableOnly) symbols = symbols.filter(function (sym) {
      return Object.getOwnPropertyDescriptor(object, sym).enumerable;
    });
    keys.push.apply(keys, symbols);
  }

  return keys;
}

export default function _objectSpread2(target) {
  for (var i = 1; i < arguments.length; i++) {
    var source = arguments[i] != null ? arguments[i] : {};

    if (i % 2) {
      ownKeys(source, true).forEach(function (key) {
        defineProperty(target, key, source[key]);
      });
    } else if (Object.getOwnPropertyDescriptors) {
      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
    } else {
      ownKeys(source).forEach(function (key) {
        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
      });
    }
  }

  return target;
}

Version data entries

12 entries across 12 versions & 4 rubygems

Version Path
disco_app-0.18.0 test/dummy/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
disco_app-0.18.2 test/dummy/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
condenser-0.0.8 lib/condenser/processors/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
jester-data-8.0.0 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
ezii-os-5.2.1 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
ezii-os-2.0.1 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
ezii-os-1.1.0 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
ezii-os-1.0.0 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
condenser-0.0.7 lib/condenser/processors/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
ezii-os-0.0.0.1.0 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
ezii-os-0.0.0.0.1 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
condenser-0.0.5 lib/condenser/processors/node_modules/@babel/runtime/helpers/esm/objectSpread2.js