isTruthyArray

Test if a value is an array-like object containing only truthy values.

Usage

var isTruthyArray = require( '@stdlib/assert/is-truthy-array' );

isTruthyArray( value )

Tests if a value is an array-like object containing only truthy values.

var bool = isTruthyArray( [ [], {} ] );
// returns true

bool = isTruthyArray( [ '', null, void 0, false, 0, NaN ] );
// returns false

Examples

var isTruthyArray = require( '@stdlib/assert/is-truthy-array' );

var bool = isTruthyArray( [ [], {}, true, 'a', 5, -5 ] );
// returns true

bool = isTruthyArray( [ null, '', NaN, 0, void 0, false ] );
// returns false

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

bool = isTruthyArray( true );
// returns false

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