isNull

Test if a value is null.

Usage

var isNull = require( '@stdlib/assert/is-null' );

isNull( value )

Tests if a value is null.

var bool = isNull( null );
// returns true

Examples

var isNull = require( '@stdlib/assert/is-null' );

var bool = isNull( null );
// returns true

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

bool = isNull( 5 );
// returns false

bool = isNull( void 0 );
// returns false

bool = isNull( true );
// returns false

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

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

bool = isNull( function foo() {} );
// returns false
Did you find this page helpful?