Objects
Helper for low-level Object manipulation.
While documented on ObjectHelper, the following static methods are implemented by this class:
Functions
5
Functions
5Returns value for a given path in the object
| Parameter | Type | Description |
|---|---|---|
object | Object | Object to check path on |
path | String | Dot-separated path, e.g. 'object.childObject.someKey' |
Value associated with passed key
Returns value for a given path in the object, placing a passed default value in at the leaf property and filling in undefined properties all the way down.
| Parameter | Type | Description |
|---|---|---|
object | Object | Object to get path value for. |
path | String | Number | String[] | Number[] | Dot-separated path, e.g. 'firstChild.childObject.someKey', or the key path as an array, e.g. ['firstChild', 'childObject', 'someKey']. |
defaultValue | * | Optionally the value to put in as the |
Value at the leaf position of the path.
Finds a property descriptor for the passed object from all inheritance levels.
| Parameter | Type | Description |
|---|---|---|
object | Object | The Object whose property to find. |
propertyName | String | The name of the property to find. |
An ECMA property descriptor is the property was found, otherwise null
Determines if the specified path exists
| Parameter | Type | Description |
|---|---|---|
object | Object | Object to check path on |
path | String | Dot-separated path, e.g. 'object.childObject.someKey' |