Update checked-in dependencies
This commit is contained in:
parent
1afca056e3
commit
6989ba7bd2
3942 changed files with 55190 additions and 132206 deletions
26
node_modules/es-abstract/2024/IsGenericDescriptor.js
generated
vendored
Normal file
26
node_modules/es-abstract/2024/IsGenericDescriptor.js
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
'use strict';
|
||||
|
||||
var $TypeError = require('es-errors/type');
|
||||
|
||||
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
|
||||
var IsDataDescriptor = require('./IsDataDescriptor');
|
||||
|
||||
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor
|
||||
|
||||
module.exports = function IsGenericDescriptor(Desc) {
|
||||
if (typeof Desc === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!isPropertyDescriptor(Desc)) {
|
||||
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
|
||||
}
|
||||
|
||||
if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue