source: trip-planner-front/node_modules/core-js/internals/object-get-prototype-of.js@ 188ee53

Last change on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 770 bytes
Line 
1var has = require('../internals/has');
2var toObject = require('../internals/to-object');
3var sharedKey = require('../internals/shared-key');
4var CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');
5
6var IE_PROTO = sharedKey('IE_PROTO');
7var ObjectPrototype = Object.prototype;
8
9// `Object.getPrototypeOf` method
10// https://tc39.es/ecma262/#sec-object.getprototypeof
11// eslint-disable-next-line es/no-object-getprototypeof -- safe
12module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
13 O = toObject(O);
14 if (has(O, IE_PROTO)) return O[IE_PROTO];
15 if (typeof O.constructor == 'function' && O instanceof O.constructor) {
16 return O.constructor.prototype;
17 } return O instanceof Object ? ObjectPrototype : null;
18};
Note: See TracBrowser for help on using the repository browser.