If the node has a parent it will return:
{ parent: parentObject, path: "propertyName",} Copy
{ parent: parentObject, path: "propertyName",}
If it has no parent (root node) it will return undefined.
undefined
Note that this function will throw if the passed object is not a node.
Parent object type.
Node to get the parent path from.
Parent path or undefined if there's no parent.
If the node has a parent it will return:
If it has no parent (root node) it will return
undefined
.Note that this function will throw if the passed object is not a node.