getOwnPropertyDescriptor < Object < JavaScript
The Object getOwnPropertyDescriptor() static method returns a property descriptor for a specific property of an object.
const test = {
property: 42,
};
const testObjOwnPropDesc = Object.getOwnPropertyDescriptor(test, 'property');
console.log(testObjOwnPropDesc);
// {
// configurable: true,
// enumerable: true,
// value: 42,
// writable: true
// }