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