just.prop(objectnon-null, pathopt, handleropt, opts) → {*}
Accesses to a deep property in a new object (or object if mutate evals to `true`).
Parameters:
Name | Type | Default | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
object | object | The base object. | |||||||||||||
path [optional] | string[] | [path] | The ordered keys. | ||||||||||||
handler [optional] | just.access~handler | returnValue | A custom function. | ||||||||||||
opts | object | Properties
|
Throws:
If some property causes access problems.
- Type
- TypeError
Returns:
If handler is given: the returned value of that function, otherwise: the last value of path in the copied object.
- Type
- Any