@stdlib/assert-is-null-array
v0.2.2
Published
Test if a value is an array-like object containing only null values.
Downloads
4
Readme
isNullArray
Test if a value is an array-like object containing only null values.
Installation
npm install @stdlib/assert-is-null-array
Usage
var isNullArray = require( '@stdlib/assert-is-null-array' );
isNullArray( value )
Tests if a value
is an array-like object containing only null
values.
var bool = isNullArray( [ null, null, null ] );
// returns true
bool = isNullArray( [ null, NaN, null ] );
// returns false
Examples
var isNullArray = require( '@stdlib/assert-is-null-array' );
var bool = isNullArray( [ null ] );
// returns true
bool = isNullArray( [ null, null, null ] );
// returns true
bool = isNullArray( null );
// returns false
bool = isNullArray( 'beep' );
// returns false
bool = isNullArray( [ null, 'boop' ] );
// returns false
bool = isNullArray( [] );
// returns false
See Also
@stdlib/assert-is-array
: test if a value is an array.@stdlib/assert-is-null
: test if a value is 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.