decord/source/4428_isPropertyDescriptor.js

51 lines
1.4 KiB
JavaScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 4428
// Function ID: 38921
2026-07-21 06:55:02 +00:00
// Name: isPropertyDescriptor
2026-07-23 10:11:24 +00:00
// Dependencies: [550, 518]
2026-07-21 06:55:02 +00:00
2026-07-25 08:10:48 +00:00
// Module 4428 (isPropertyDescriptor)
2026-07-23 10:11:24 +00:00
const obj = { "[[Configurable]]": true, "[[Enumerable]]": true, "[[Get]]": true, "[[Set]]": true, "[[Value]]": true, "[[Writable]]": true };
2026-07-21 06:55:02 +00:00
Object.setPrototypeOf(null);
export default function isPropertyDescriptor(obj) {
if (obj) {
if ("object" === typeof obj) {
for (const key10003 in arg0) {
let tmp20 = key10003;
2026-07-23 10:11:24 +00:00
let tmp21 = require;
let tmp22 = dependencyMap;
if (!require(550) /* bind */(arg0, key10003)) {
2026-07-21 06:55:02 +00:00
continue;
} else {
2026-07-23 10:11:24 +00:00
let tmp = obj;
if (obj[key10003]) {
2026-07-21 06:55:02 +00:00
continue;
} else {
let flag = false;
return false;
}
}
continue;
}
2026-07-23 10:11:24 +00:00
let tmp4 = require(550) /* bind */(obj, "[[Value]]");
2026-07-21 06:55:02 +00:00
if (!tmp4) {
2026-07-23 10:11:24 +00:00
tmp4 = require(550) /* bind */(obj, "[[Writable]]");
2026-07-21 06:55:02 +00:00
}
2026-07-23 10:11:24 +00:00
let tmp9 = require(550) /* bind */(obj, "[[Get]]");
2026-07-21 06:55:02 +00:00
if (!tmp9) {
2026-07-23 10:11:24 +00:00
tmp9 = require(550) /* bind */(obj, "[[Set]]");
2026-07-21 06:55:02 +00:00
}
if (tmp4) {
if (tmp9) {
2026-07-23 10:11:24 +00:00
let tmp14 = require(518);
2026-07-21 06:55:02 +00:00
const prototype = tmp14.prototype;
tmp14 = new tmp14("Property Descriptors may not be both accessor and data descriptors");
throw tmp14;
}
}
return true;
}
}
return false;
};