Is String empty after trim - Node.js String

Node.js examples for String:Trim

Description

Is String empty after trim

Demo Code

function stringEmpty (str) {
    var strcatch = String(str);
    return strTrim(strcatch).length == 0;
}
function strTrim(str) {
    var strcatch = String(str);
    return strcatch.replace(/^\s+|\s+$/gm,'');
}

Related Tutorials