Sha256: 8d98970c087310be0c20ad480da6fca2c1bd49f76b5bba31be4346e7a9b3cc3f

Contents?: true

Size: 859 Bytes

Versions: 25

Compression:

Stored size: 859 Bytes

Contents

var anObject = require('../internals/an-object');
var aPossiblePrototype = require('../internals/a-possible-prototype');

// `Object.setPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.setprototypeof
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  var CORRECT_SETTER = false;
  var test = {};
  var setter;
  try {
    setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
    setter.call(test, []);
    CORRECT_SETTER = test instanceof Array;
  } catch (error) { /* empty */ }
  return function setPrototypeOf(O, proto) {
    anObject(O);
    aPossiblePrototype(proto);
    if (CORRECT_SETTER) setter.call(O, proto);
    else O.__proto__ = proto;
    return O;
  };
}() : undefined);

Version data entries

25 entries across 25 versions & 7 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/core-js/internals/object-set-prototype-of.js
disco_app-0.18.0 test/dummy/node_modules/core-js/internals/object-set-prototype-of.js
disco_app-0.18.2 test/dummy/node_modules/core-js/internals/object-set-prototype-of.js
tang-0.2.1 spec/tang_app/node_modules/core-js/internals/object-set-prototype-of.js
tang-0.2.0 spec/tang_app/node_modules/core-js/internals/object-set-prototype-of.js
tang-0.1.0 spec/tang_app/node_modules/core-js/internals/object-set-prototype-of.js
tang-0.0.9 spec/tang_app/node_modules/core-js/internals/object-set-prototype-of.js
enju_library-0.3.8 spec/dummy/node_modules/core-js/internals/object-set-prototype-of.js
condenser-0.3 lib/condenser/processors/node_modules/core-js-pure/internals/object-set-prototype-of.js
condenser-0.2 lib/condenser/processors/node_modules/core-js-pure/internals/object-set-prototype-of.js
condenser-0.1 lib/condenser/processors/node_modules/core-js-pure/internals/object-set-prototype-of.js
condenser-0.0.12 lib/condenser/processors/node_modules/core-js-pure/internals/object-set-prototype-of.js
condenser-0.0.11 lib/condenser/processors/node_modules/core-js-pure/internals/object-set-prototype-of.js
condenser-0.0.10 lib/condenser/processors/node_modules/core-js-pure/internals/object-set-prototype-of.js
condenser-0.0.9 lib/condenser/processors/node_modules/core-js-pure/internals/object-set-prototype-of.js
condenser-0.0.8 lib/condenser/processors/node_modules/core-js-pure/internals/object-set-prototype-of.js
jester-data-8.0.0 node_modules/core-js/internals/object-set-prototype-of.js
ezii-os-5.2.1 node_modules/core-js/internals/object-set-prototype-of.js
ezii-os-2.0.1 node_modules/core-js/internals/object-set-prototype-of.js
ezii-os-1.1.0 node_modules/core-js/internals/object-set-prototype-of.js