@stdlib/assert-is-null
v0.2.2
Published
Test if a value is null.
Downloads
43,791
Readme
isNull
Test if a value is null.
Installation
npm install @stdlib/assert-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
See Also
@stdlib/assert-is-undefined
: test if a value is undefined.@stdlib/assert-is-undefined-or-null
: test if a value is undefined or null.
Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2024. The Stdlib Authors.