JSFiddle - React, Tailwind, and code Playground

HTML

<span> </span>
 <span></span>

JavaScript

$('span').filter(function() {
   return !this.innerHTML.replace(/\s/g,'').length;
});