Created
March 1, 2011 02:16
-
-
Save rafaelrinaldi/848476 to your computer and use it in GitHub Desktop.
Easy way to check if a value is unassigned or not.
This file contains 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
package tea.util | |
{ | |
/** | |
* | |
* Easy way to check if a value is unassigned or not. | |
* | |
* @param p_value Value to check. | |
* @return True if the value is unassigned, false otherwise. | |
*/ | |
public function isUnassigned( p_value : * ) : Boolean | |
{ | |
return Boolean(p_value == null || p_value == undefined || isNaN(p_value) || p_value == Infinity); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment