source: imaps-frontend/node_modules/core-js/modules/es.object.proto.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 1.2 KB
Line 
1'use strict';
2var DESCRIPTORS = require('../internals/descriptors');
3var defineBuiltInAccessor = require('../internals/define-built-in-accessor');
4var isObject = require('../internals/is-object');
5var isPossiblePrototype = require('../internals/is-possible-prototype');
6var toObject = require('../internals/to-object');
7var requireObjectCoercible = require('../internals/require-object-coercible');
8
9// eslint-disable-next-line es/no-object-getprototypeof -- safe
10var getPrototypeOf = Object.getPrototypeOf;
11// eslint-disable-next-line es/no-object-setprototypeof -- safe
12var setPrototypeOf = Object.setPrototypeOf;
13var ObjectPrototype = Object.prototype;
14var PROTO = '__proto__';
15
16// `Object.prototype.__proto__` accessor
17// https://tc39.es/ecma262/#sec-object.prototype.__proto__
18if (DESCRIPTORS && getPrototypeOf && setPrototypeOf && !(PROTO in ObjectPrototype)) try {
19 defineBuiltInAccessor(ObjectPrototype, PROTO, {
20 configurable: true,
21 get: function __proto__() {
22 return getPrototypeOf(toObject(this));
23 },
24 set: function __proto__(proto) {
25 var O = requireObjectCoercible(this);
26 if (isPossiblePrototype(proto) && isObject(O)) {
27 setPrototypeOf(O, proto);
28 }
29 }
30 });
31} catch (error) { /* empty */ }
Note: See TracBrowser for help on using the repository browser.