title: Does d3 have api which similar with jQuery.closest(selector)?
body: <p>DOM like this:</p>
  
  <pre><code>&lt;g.module&gt;
    &lt;g.control&gt;
      &lt;rect&gt;
  </code></pre>
  
  <p>I didn't find the closest API:
  <a href="https://github.com/mbostock/d3/wiki/API-Reference" rel="noreferrer">https://github.com/mbostock/d3/wiki/API-Reference</a></p>
  
  <p>How can I get the nearest matched elements from it's parent? Just like this:</p>
  
  <pre><code>var module = d3.select(".control").closest(".module");
  </code></pre>