Skip to content

Instantly share code, notes, and snippets.

@06b
Created February 7, 2014 21:02
Show Gist options
  • Select an option

  • Save 06b/8871793 to your computer and use it in GitHub Desktop.

Select an option

Save 06b/8871793 to your computer and use it in GitHub Desktop.
String.IsNullOrEmpty implementation
// 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