Sha256: 03fc38f36ad6689e2f6ec3f85c5ea83ca1ab9ccfc7509f2da8018906586f4318

Contents?: true

Size: 906 Bytes

Versions: 82

Compression:

Stored size: 906 Bytes

Contents

// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
var isObject = require('./_is-object');
var anObject = require('./_an-object');
var check = function (O, proto) {
  anObject(O);
  if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
};
module.exports = {
  set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
    function (test, buggy, set) {
      try {
        set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);
        set(test, []);
        buggy = !(test instanceof Array);
      } catch (e) { buggy = true; }
      return function setPrototypeOf(O, proto) {
        check(O, proto);
        if (buggy) O.__proto__ = proto;
        else set(O, proto);
        return O;
      };
    }({}, false) : undefined),
  check: check
};

Version data entries

82 entries across 38 versions & 8 rubygems

Version Path
optimacms-0.4.2 spec/dummy/node_modules/core-js/modules/_set-proto.js
optimacms-0.4.2 spec/dummy/node_modules/core-js/library/modules/_set-proto.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/core-js/modules/_set-proto.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/core-js/library/modules/_set-proto.js
lux_assets-0.2.11 ./node_modules/core-js/library/modules/_set-proto.js
lux_assets-0.2.11 ./node_modules/core-js/modules/_set-proto.js
lux_assets-0.2.9 ./node_modules/core-js/library/modules/_set-proto.js
lux_assets-0.2.9 ./node_modules/core-js/modules/_set-proto.js
lux_assets-0.2.4 ./node_modules/core-js/modules/_set-proto.js
lux_assets-0.2.4 ./node_modules/core-js/library/modules/_set-proto.js
lux_assets-0.2.2 ./node_modules/core-js/modules/_set-proto.js
lux_assets-0.2.2 ./node_modules/core-js/library/modules/_set-proto.js
lux_assets-0.2.1 ./node_modules/core-js/modules/_set-proto.js
lux_assets-0.2.1 ./node_modules/core-js/library/modules/_set-proto.js
locomotivecms-3.4.0 app/javascript/node_modules/core-js/modules/_set-proto.js
locomotivecms-3.4.0 app/javascript/node_modules/core-js/library/modules/_set-proto.js
cortex-0.1.3 spec/dummy/node_modules/core-js/modules/_set-proto.js
cortex-0.1.3 spec/dummy/node_modules/core-js/library/modules/_set-proto.js
condenser-0.0.4 lib/condenser/processors/node_modules/core-js/modules/_set-proto.js
condenser-0.0.4 lib/condenser/processors/node_modules/core-js/library/modules/_set-proto.js