time-to-botec/squiggle/node_modules/@stdlib/utils/define-write-only-accessor/docs/repl.txt
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

31 lines
535 B
Plaintext

{{alias}}( obj, prop, setter )
Defines a write-only accessor.
Write-only accessors are enumerable and non-configurable.
Parameters
----------
obj: Object
Object on which to define the property.
prop: string|symbol
Property name.
setter: Function
Set accessor.
Examples
--------
> var obj = {};
> var val = '';
> function setter( v ) { val = v; };
> {{alias}}( obj, 'foo', setter );
> obj.foo = 'bar';
> val
'bar'
See Also
--------