value to test
property to test
boolean indicating if an object property is read-only
var defineProperty = require( `@stdlib/utils/define-property` );
var obj = {
'boop': true
};
defineProperty( obj, 'beep', {
'configurable': false,
'enumerable': true,
'writable': false,
'value': true
});
var bool = isReadOnlyProperty( obj, 'boop' );
// returns false
bool = isReadOnlyProperty( obj, 'beep' );
// returns true
Tests if an object's own property is read-only.