# Non-Enumerable Write-Only Accessor
> [Define][@stdlib/utils/define-property] a non-enumerable **write-only** accessor.
## Usage
```javascript
var setNonEnumerableWriteOnlyAccessor = require( '@stdlib/utils/define-nonenumerable-write-only-accessor' );
```
#### setNonEnumerableWriteOnlyAccessor( obj, prop, setter )
[Defines][@stdlib/utils/define-property] a non-enumerable **write-only** accessor.
```javascript
var obj = {};
var val = '';
function setter( v ) {
val = v;
}
setNonEnumerableWriteOnlyAccessor( obj, 'foo', setter );
obj.foo = 'boop';
var bool = ( val === 'boop' );
// returns true
```
## Notes
- Non-enumerable write-only accessors are **non-configurable**.
## Examples
```javascript
var setNonEnumerableWriteOnlyAccessor = require( '@stdlib/utils/define-nonenumerable-write-only-accessor' );
function Foo( secret ) {
if ( !(this instanceof Foo) ) {
return new Foo( secret );
}
setNonEnumerableWriteOnlyAccessor( this, 'secret', setter );
return this;
function setter( v ) {
secret = v;
}
}
var foo = new Foo( 'beep' );
foo.secret = 'boop';
```
[@stdlib/utils/define-property]: https://www.npmjs.com/package/@stdlib/utils/tree/main/define-property