Iterates deeply through the entries of almost any data structure or object.
The root node to start the iteration.
Function to execute by each node before iterating it.
Options to customize traversal behavior. Defaults to deepIterate.options.
deepIterate.options
The arguments and visit log in a plain object.
Type parameters:
TypeError if the arguments are invalid.
deepIterate( { a: { b: { c: [ "d", "f", "g" ] } } }, (child) => { console.log(`${child.path} = ${child.value}`) }, { pathType: "string" }); Copy
deepIterate( { a: { b: { c: [ "d", "f", "g" ] } } }, (child) => { console.log(`${child.path} = ${child.value}`) }, { pathType: "string" });
3.0.0-beta.3
Default options argument for deepIterate.
They are necessary when an option is not entered.
TypeError if some option is of invalid type.
3.0.0-beta.0
Iterates deeply through the entries of almost any data structure or object.