Regex JavaScript Sprawdź, czy ciąg jest pusty

function IsEmptyOrWhiteSpace(str) {
    return (str.match(/^\s*$/) || []).length > 0;
}
Zwazel