pinalbhatt
6/22/2015 - 12:05 PM

Javascript isNullOrWhitespace

Javascript isNullOrWhitespace

function isNullOrWhitespace( input ) {

    if (typeof input === 'undefined' || input == null) return true;

    return input.replace(/\s/g, '').length < 1;
}