main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
352 bytes
|
Rev | Line | |
---|
[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | var GetIntrinsic = require('get-intrinsic');
|
---|
| 4 |
|
---|
| 5 | var originalSetProto = GetIntrinsic('%Object.setPrototypeOf%', true);
|
---|
| 6 |
|
---|
| 7 | var hasProto = require('has-proto')();
|
---|
| 8 |
|
---|
| 9 | module.exports = originalSetProto || (
|
---|
| 10 |
|
---|
| 11 | hasProto
|
---|
| 12 | ? function (O, proto) {
|
---|
| 13 | O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign
|
---|
| 14 | return O;
|
---|
| 15 | }
|
---|
| 16 | : null
|
---|
| 17 | );
|
---|
Note:
See
TracBrowser
for help on using the repository browser.