Created
February 7, 2014 21:02
-
-
Save 06b/8871793 to your computer and use it in GitHub Desktop.
String.IsNullOrEmpty implementation
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
| // String.IsNullOrEmpty implementation | |
| String.IsNullOrEmpty = function(value){ | |
| if(value){ | |
| if( typeof( value ) == 'string' ){ | |
| if( value.length > 0 ) | |
| return false; | |
| } | |
| if( value != null ) | |
| return false; | |
| } | |
| return true; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment