Function depthTraverse
- depthTraverse(data: object | [], func: Function, modify?: boolean): object | []
Parameters
- data: object | []
An object or array.
- func: Function
A callback function to process leaf values in children arrays or object members.
Optional
modify: booleanIf true then the result of the callback function is used to modify in place the given data.
Returns object | []
The data object.
- data: object | []
Performs a naive depth traversal of an object / array. The data structure must not have circular references. The result of the callback function is used to modify in place the given data.