17 lines
358 B
JavaScript
17 lines
358 B
JavaScript
|
'use strict';
|
||
|
|
||
|
var GetIntrinsic = require('get-intrinsic');
|
||
|
|
||
|
/** @type {import('.')} */
|
||
|
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;
|
||
|
if ($defineProperty) {
|
||
|
try {
|
||
|
$defineProperty({}, 'a', { value: 1 });
|
||
|
} catch (e) {
|
||
|
// IE 8 has a broken defineProperty
|
||
|
$defineProperty = false;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = $defineProperty;
|