source: trip-planner-front/node_modules/core-js/modules/es.reflect.prevent-extensions.js

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
RevLine 
[6a3a178]1var $ = require('../internals/export');
2var getBuiltIn = require('../internals/get-built-in');
3var anObject = require('../internals/an-object');
4var FREEZING = require('../internals/freezing');
5
6// `Reflect.preventExtensions` method
7// https://tc39.es/ecma262/#sec-reflect.preventextensions
8$({ target: 'Reflect', stat: true, sham: !FREEZING }, {
9 preventExtensions: function preventExtensions(target) {
10 anObject(target);
11 try {
12 var objectPreventExtensions = getBuiltIn('Object', 'preventExtensions');
13 if (objectPreventExtensions) objectPreventExtensions(target);
14 return true;
15 } catch (error) {
16 return false;
17 }
18 }
19});
Note: See TracBrowser for help on using the repository browser.