Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
659 bytes
|
Line | |
---|
1 | var $ = require('../internals/export');
|
---|
2 | var fails = require('../internals/fails');
|
---|
3 | var toObject = require('../internals/to-object');
|
---|
4 | var nativeGetPrototypeOf = require('../internals/object-get-prototype-of');
|
---|
5 | var CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');
|
---|
6 |
|
---|
7 | var FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });
|
---|
8 |
|
---|
9 | // `Object.getPrototypeOf` method
|
---|
10 | // https://tc39.es/ecma262/#sec-object.getprototypeof
|
---|
11 | $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {
|
---|
12 | getPrototypeOf: function getPrototypeOf(it) {
|
---|
13 | return nativeGetPrototypeOf(toObject(it));
|
---|
14 | }
|
---|
15 | });
|
---|
16 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.