HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-26-0-120 6.17.0-1009-aws #9~24.04.2-Ubuntu SMP Fri Mar 6 23:50:29 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/orbi-individual/node_modules/is-data-descriptor/index.js
'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;
};