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