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
immosquare-cleaner-0.1.60 node_modules/core-js/library/modules/_set-proto.js
immosquare-cleaner-0.1.60 node_modules/core-js/modules/_set-proto.js
immosquare-cleaner-0.1.59 node_modules/core-js/library/modules/_set-proto.js
immosquare-cleaner-0.1.59 node_modules/core-js/modules/_set-proto.js
immosquare-cleaner-0.1.58 node_modules/core-js/library/modules/_set-proto.js
immosquare-cleaner-0.1.58 node_modules/core-js/modules/_set-proto.js
immosquare-cleaner-0.1.57 node_modules/core-js/modules/_set-proto.js
immosquare-cleaner-0.1.57 node_modules/core-js/library/modules/_set-proto.js
immosquare-cleaner-0.1.56 node_modules/core-js/library/modules/_set-proto.js
immosquare-cleaner-0.1.56 node_modules/core-js/modules/_set-proto.js
immosquare-cleaner-0.1.55 node_modules/core-js/library/modules/_set-proto.js
immosquare-cleaner-0.1.55 node_modules/core-js/modules/_set-proto.js
immosquare-cleaner-0.1.54 node_modules/core-js/library/modules/_set-proto.js
immosquare-cleaner-0.1.54 node_modules/core-js/modules/_set-proto.js
immosquare-cleaner-0.1.53 node_modules/core-js/modules/_set-proto.js
immosquare-cleaner-0.1.53 node_modules/core-js/library/modules/_set-proto.js
immosquare-cleaner-0.1.52 node_modules/core-js/library/modules/_set-proto.js
immosquare-cleaner-0.1.52 node_modules/core-js/modules/_set-proto.js
immosquare-cleaner-0.1.51 node_modules/core-js/library/modules/_set-proto.js
immosquare-cleaner-0.1.51 node_modules/core-js/modules/_set-proto.js