time-to-botec/squiggle/node_modules/@stdlib/utils/define-nonenumerable-read-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

29 lines
511 B
Plaintext

{{alias}}( obj, prop, getter )
Defines a non-enumerable read-only accessor.
Non-enumerable read-only accessors are non-configurable.
Parameters
----------
obj: Object
Object on which to define the property.
prop: string|symbol
Property name.
getter: Function
Get accessor.
Examples
--------
> var obj = {};
> function getter() { return 'bar'; };
> {{alias}}( obj, 'foo', getter );
> obj.foo
'bar'
See Also
--------