title: How to replace a path in AST with just parsed javascript(string)?
body: <p><a href="https://astexplorer.net/#/gist/70df1bc56b9ee73d19fc949d2ef829ed/7e14217fd8510f0bf83f3372bf08454b7617bce1" rel="noreferrer">https://astexplorer.net/#/gist/70df1bc56b9ee73d19fc949d2ef829ed/7e14217fd8510f0bf83f3372bf08454b7617bce1</a></p>
  
  <p>I've found now I'm trying to <code>replace</code> an expression and I don't care whats in it.</p>
  
  <p>in this example I've found the <code>this.state.showMenu &amp;&amp; this.handleMouseDown</code> portion in</p>
  
  <pre><code>&lt;a
    onMouseDown={this.state.showMenu &amp;&amp; this.handleMouseDown}
  &gt;
  </code></pre>
  
  <p>I need to convert to: </p>
  
  <pre><code>&lt;a
    onMouseDown={this.state.showMenu ? this.handleMouseDown : undefined}
  &gt;
  </code></pre>
  
  <p>how can I do so without explicitly reconstructing the tree? I just want to do something like</p>
  
  <pre><code>path.replaceText("this.state.showMenu ? this.handleMouseDown : undefined")
  </code></pre>