JSFiddle - React, Tailwind, and code Playground
by Frank Liu
HTML
<div id="res"></div>
JavaScript
function isBlank(str) {
return (!str || /^\s*$/.test(str));
// return (!str || str.trim());
}
let str= new Object();
let div = document.getElementById('res');
div.innerHTML = isBlank(str);