Module: sources/cores/voids/isDefined

Export function to validate if a value is a defined or not
Author:
License:
Source:

Example

import { isDefined } from 'itee-validators'

if( isDefined( value ) ) {
    //...
} else {
    //...
}

Methods


<static> isDefined(data)

Check if given data is not null and not undefined
Parameters:
Name Type Description
data * The data to check against the existence
Source:
Returns:
true if data is not null and not undefined, false otherwise.
Type
boolean

<static> isNotDefined(data)

Check if given data is null or undefined
Parameters:
Name Type Description
data * The data to check against the existence
Source:
Returns:
true if data is null or undefined, false otherwise.
Type
boolean