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

30 lines
583 B
Plaintext

{{alias}}( obj, prop, fcn )
Defines a memoized read-only object property.
Read-only properties are enumerable and non-configurable.
Parameters
----------
obj: Object
Object on which to define the property.
prop: string|symbol
Property name.
fcn: Function
Synchronous function whose return value will be memoized and set as the
property value.
Examples
--------
> var obj = {};
> function foo() { return 'bar'; };
> {{alias}}( obj, 'foo', foo );
> obj.foo
'bar'
See Also
--------