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:
358 bytes
|
Rev | Line | |
---|
[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | var GetIntrinsic = require('get-intrinsic');
|
---|
| 4 |
|
---|
| 5 | /** @type {import('.')} */
|
---|
| 6 | var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;
|
---|
| 7 | if ($defineProperty) {
|
---|
| 8 | try {
|
---|
| 9 | $defineProperty({}, 'a', { value: 1 });
|
---|
| 10 | } catch (e) {
|
---|
| 11 | // IE 8 has a broken defineProperty
|
---|
| 12 | $defineProperty = false;
|
---|
| 13 | }
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | module.exports = $defineProperty;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.