JSFiddle - React, Tailwind, and code Playground

HTML

<li>
    <div>Some stuff</div>
    <a href="http://www.mysite.com/">New Item</a> 
    (1 vote)
</li>

JavaScript

$("li").contents().filter(function(){ return this.nodeType != 1; }).remove();