Sha256: 3b065b4c4d3d49ab8f8ea0c6e24dcf4ab0bffc5a76ebfa62911b0d469aed437b

Contents?: true

Size: 1.67 KB

Versions: 12

Compression:

Stored size: 1.67 KB

Contents

'use strict';
var DESCRIPTORS = require('../internals/descriptors');
var fails = require('../internals/fails');
var objectKeys = require('../internals/object-keys');
var getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');
var propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');
var toObject = require('../internals/to-object');
var IndexedObject = require('../internals/indexed-object');

var nativeAssign = Object.assign;

// `Object.assign` method
// https://tc39.github.io/ecma262/#sec-object.assign
// should work with symbols and should have deterministic property order (V8 bug)
module.exports = !nativeAssign || fails(function () {
  var A = {};
  var B = {};
  // eslint-disable-next-line no-undef
  var symbol = Symbol();
  var alphabet = 'abcdefghijklmnopqrst';
  A[symbol] = 7;
  alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  var T = toObject(target);
  var argumentsLength = arguments.length;
  var index = 1;
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  var propertyIsEnumerable = propertyIsEnumerableModule.f;
  while (argumentsLength > index) {
    var S = IndexedObject(arguments[index++]);
    var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
    var length = keys.length;
    var j = 0;
    var key;
    while (length > j) {
      key = keys[j++];
      if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
    }
  } return T;
} : nativeAssign;

Version data entries

12 entries across 12 versions & 4 rubygems

Version Path
disco_app-0.18.0 test/dummy/node_modules/core-js/internals/object-assign.js
disco_app-0.18.2 test/dummy/node_modules/core-js/internals/object-assign.js
condenser-0.0.8 lib/condenser/processors/node_modules/core-js-pure/internals/object-assign.js
jester-data-8.0.0 node_modules/core-js/internals/object-assign.js
ezii-os-5.2.1 node_modules/core-js/internals/object-assign.js
ezii-os-2.0.1 node_modules/core-js/internals/object-assign.js
ezii-os-1.1.0 node_modules/core-js/internals/object-assign.js
ezii-os-1.0.0 node_modules/core-js/internals/object-assign.js
condenser-0.0.7 lib/condenser/processors/node_modules/core-js-pure/internals/object-assign.js
ezii-os-0.0.0.1.0 node_modules/core-js/internals/object-assign.js
ezii-os-0.0.0.0.1 node_modules/core-js/internals/object-assign.js
condenser-0.0.5 lib/condenser/processors/node_modules/core-js-pure/internals/object-assign.js