hexo/node_modules/core-js/library/modules/es6.reflect.prevent-extensi...

17 lines
424 B
JavaScript
Raw Normal View History

2023-09-25 15:58:56 +08:00
// 26.1.12 Reflect.preventExtensions(target)
var $export = require('./_export');
var anObject = require('./_an-object');
var $preventExtensions = Object.preventExtensions;
$export($export.S, 'Reflect', {
preventExtensions: function preventExtensions(target) {
anObject(target);
try {
if ($preventExtensions) $preventExtensions(target);
return true;
} catch (e) {
return false;
}
}
});