This commit is contained in:
2023-12-05 17:03:01 +00:00
parent aec42feb5e
commit ea9944383f
1246 changed files with 125706 additions and 0 deletions

43
node_modules/is-data-descriptor/index.js generated vendored Normal file
View File

@@ -0,0 +1,43 @@
'use strict';
var hasOwn = require('hasown');
// data descriptor properties
var data = {
__proto__: null,
configurable: 'boolean',
enumerable: 'boolean',
writable: 'boolean',
};
module.exports = function isDataDescriptor(obj, prop) {
if (!obj || typeof obj !== 'object') {
return false;
}
if (typeof prop === 'string') {
var val = Object.getOwnPropertyDescriptor(obj, prop);
return typeof val !== 'undefined';
}
if (
(!('value' in obj) && !('writable' in obj))
|| 'get' in obj
|| 'set' in obj
) {
return false;
}
for (var key in obj) { // eslint-disable-line no-restricted-syntax
if (
key !== 'value'
&& hasOwn(obj, key)
&& hasOwn(data, key)
&& typeof obj[key] !== data[key]
&& typeof obj[key] !== 'undefined'
) {
return false;
}
}
return true;
};