new Boolean()
- Since:
-
- 1.0.0
Methods
-
<static> getNullSafe(bool)
-
Returns a non-null boolean, even if the object being passed is a null boolean.
If the passed-in object is a non-null boolean, then it is returned as-is.
Example usage:
var bool1 = true; var bool2 = null; var bool3 = mindsmine.Boolean.getNullSafe(bool1); var bool4 = mindsmine.Boolean.getNullSafe(bool2); // bool3 now contains the boolean: true // bool4 now contains the boolean: false
Parameters:
Name Type Description bool
Boolean The boolean to safeguard against
null
.- Since:
-
- 1.0.0
Returns:
If bool is
null
thenfalse
.- Type
- Boolean