value to test
property to test
boolean indicating if an object property has a data descriptor
var defineProperty = require( `@stdlib/utils/define-property` );
var obj = {
'boop': true
};
function getter() {
return 'beep';
}
defineProperty( obj, 'beep', {
'configurable': false,
'enumerable': false,
'get': getter
});
var bool = isDataPropertyIn( obj, 'boop' );
// returns true
bool = isDataPropertyIn( obj, 'beep' );
// returns false
Tests if an object's own or inherited property has a data descriptor.