Created
June 22, 2015 12:05
-
-
Save pinalbhatt/d7cb74b2ecdb0cbc9705 to your computer and use it in GitHub Desktop.
Javascript isNullOrWhitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isNullOrWhitespace( input ) { | |
if (typeof input === 'undefined' || input == null) return true; | |
return input.replace(/\s/g, '').length < 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment