react javascript check for empty string and not all whitespace code example
Example: typescript string null or white space
function isEmptyOrSpaces(str){
return str === null || str.match(/^ *$/) !== null;
}
function isEmptyOrSpaces(str){
return str === null || str.match(/^ *$/) !== null;
}