Sha256: 266e141dc325043494169a1faeb82466811904d4aa74b370db36cd4e1e32f56c

Contents?: true

Size: 1.04 KB

Versions: 36

Compression:

Stored size: 1.04 KB

Contents

var defineProperty = require("./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;
}

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

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

  return target;
}

module.exports = _objectSpread2;

Version data entries

36 entries across 36 versions & 5 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/@babel/runtime/helpers/objectSpread2.js
trusty-cms-5.0.7 node_modules/@babel/runtime/helpers/objectSpread2.js
trusty-cms-5.0.6 node_modules/@babel/runtime/helpers/objectSpread2.js
trusty-cms-5.0.5 node_modules/@babel/runtime/helpers/objectSpread2.js
trusty-cms-5.0.4 node_modules/@babel/runtime/helpers/objectSpread2.js
trusty-cms-5.0.3 node_modules/@babel/runtime/helpers/objectSpread2.js
trusty-cms-5.0.2 node_modules/@babel/runtime/helpers/objectSpread2.js
trusty-cms-5.0.1 node_modules/@babel/runtime/helpers/objectSpread2.js
trusty-cms-4.3.5 node_modules/@babel/runtime/helpers/objectSpread2.js
trusty-cms-5.0.0 node_modules/@babel/runtime/helpers/objectSpread2.js
trusty-cms-4.3.4 node_modules/@babel/runtime/helpers/objectSpread2.js
trusty-cms-4.3.3 node_modules/@babel/runtime/helpers/objectSpread2.js
trusty-cms-4.3.2 node_modules/@babel/runtime/helpers/objectSpread2.js
trusty-cms-4.3.1 node_modules/@babel/runtime/helpers/objectSpread2.js
trusty-cms-4.3 node_modules/@babel/runtime/helpers/objectSpread2.js
trusty-cms-4.2.3 node_modules/@babel/runtime/helpers/objectSpread2.js
tang-0.2.1 spec/tang_app/node_modules/@babel/runtime/helpers/objectSpread2.js
trusty-cms-4.2.2 node_modules/@babel/runtime/helpers/objectSpread2.js
trusty-cms-4.2.1 node_modules/@babel/runtime/helpers/objectSpread2.js
trusty-cms-4.2 node_modules/@babel/runtime/helpers/objectSpread2.js