refactor start
This commit is contained in:
parent
bd49791e06
commit
e46d25f0b7
16699 changed files with 2 additions and 1484887 deletions
26
home/ags/node_modules/es-abstract/2019/IsGenericDescriptor.js
generated
vendored
26
home/ags/node_modules/es-abstract/2019/IsGenericDescriptor.js
generated
vendored
|
|
@ -1,26 +0,0 @@
|
|||
'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