Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2024-09-16 17:29:58 +00:00
parent 1afca056e3
commit 6989ba7bd2
3942 changed files with 55190 additions and 132206 deletions

View file

@ -1,38 +1,42 @@
'use strict';
var has = require('has');
var $TypeError = require('es-errors/type');
var assertRecord = require('../helpers/assertRecord');
var hasOwn = require('hasown');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsGenericDescriptor = require('./IsGenericDescriptor');
var Type = require('./Type');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor
module.exports = function CompletePropertyDescriptor(Desc) {
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
/* eslint no-param-reassign: 0 */
assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
if (!has(Desc, '[[Value]]')) {
if (!hasOwn(Desc, '[[Value]]')) {
Desc['[[Value]]'] = void 0;
}
if (!has(Desc, '[[Writable]]')) {
if (!hasOwn(Desc, '[[Writable]]')) {
Desc['[[Writable]]'] = false;
}
} else {
if (!has(Desc, '[[Get]]')) {
if (!hasOwn(Desc, '[[Get]]')) {
Desc['[[Get]]'] = void 0;
}
if (!has(Desc, '[[Set]]')) {
if (!hasOwn(Desc, '[[Set]]')) {
Desc['[[Set]]'] = void 0;
}
}
if (!has(Desc, '[[Enumerable]]')) {
if (!hasOwn(Desc, '[[Enumerable]]')) {
Desc['[[Enumerable]]'] = false;
}
if (!has(Desc, '[[Configurable]]')) {
if (!hasOwn(Desc, '[[Configurable]]')) {
Desc['[[Configurable]]'] = false;
}
return Desc;