30 lines
588 B
Plaintext
30 lines
588 B
Plaintext
|
|
{{alias}}( obj, prop, fcn )
|
|
Defines a configurable memoized read-only object property.
|
|
|
|
Configurable read-only properties are enumerable.
|
|
|
|
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
|
|
--------
|
|
|