Sha256: 8ebaeb35ab45be0a5d1010702ef88dceead7bd78fb579201b7b85dc823c2b7a1

Contents?: true

Size: 1.04 KB

Versions: 30

Compression:

Stored size: 1.04 KB

Contents

import defineProperty from "./defineProperty.js";

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(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;
}

Version data entries

30 entries across 30 versions & 3 rubygems

Version Path
isomorfeus-redux-4.2.0 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
isomorfeus-redux-4.1.18 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
isomorfeus-redux-4.1.17 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
isomorfeus-redux-4.1.16 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
isomorfeus-redux-4.1.15 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
isomorfeus-redux-4.1.14 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
isomorfeus-redux-4.1.13 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
isomorfeus-redux-4.1.12 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
disco_app-0.16.1 test/dummy/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
isomorfeus-redux-4.1.11 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
isomorfeus-redux-4.1.10 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
isomorfeus-redux-4.1.9 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
disco_app-0.15.2 test/dummy/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
isomorfeus-redux-4.1.8 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
isomorfeus-redux-4.1.7 node_modules/@babel/runtime/helpers/esm/objectSpread2.js
disco_app-0.18.4 test/dummy/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
disco_app-0.18.1 test/dummy/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
disco_app-0.14.0 test/dummy/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/@babel/runtime/helpers/esm/objectSpread2.js