index.js 358 B

12345678910111213141516
  1. 'use strict';
  2. var GetIntrinsic = require('get-intrinsic');
  3. /** @type {import('.')} */
  4. var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;
  5. if ($defineProperty) {
  6. try {
  7. $defineProperty({}, 'a', { value: 1 });
  8. } catch (e) {
  9. // IE 8 has a broken defineProperty
  10. $defineProperty = false;
  11. }
  12. }
  13. module.exports = $defineProperty;