Skip to content

Latest commit

 

History

History

is-undefined-or-null

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

isUndefinedOrNull

Test if a value is undefined or null.

Usage

var isUndefinedOrNull = require( '@stdlib/assert/is-undefined-or-null' );

isUndefinedOrNull( value )

Tests if a value is undefined or null.

var bool = isUndefinedOrNull( undefined );
// returns true

bool = isUndefinedOrNull( null );
// returns true

Examples

var isUndefinedOrNull = require( '@stdlib/assert/is-undefined-or-null' );

var bool;
var x;

bool = isUndefinedOrNull( x );
// returns true

bool = isUndefinedOrNull( undefined );
// returns true

bool = isUndefinedOrNull( void 0 );
// returns true

bool = isUndefinedOrNull( null );
// returns true

bool = isUndefinedOrNull( 'beep' );
// returns false

bool = isUndefinedOrNull( 5 );
// returns false

bool = isUndefinedOrNull( true );
// returns false

bool = isUndefinedOrNull( {} );
// returns false

bool = isUndefinedOrNull( [] );
// returns false

bool = isUndefinedOrNull( function foo() {} );
// returns false

See Also