Function setPath

  • Set the parent property on a node. By default it will skip nodes that already have a parent property, but you can set force = true to prevent that.

    Parameters

    • node: Node
    • parentPath: any
    • Optional options: {
          force: boolean;
      } = {}
      • force: boolean

        Allow overwriting

    Returns boolean

    false if the parent was already set, and undefined otherwise

Generated using TypeDoc