@stdlib/array
Version:
Arrays.
29 lines (20 loc) • 573 B
Plain Text
{{alias}}( x )
Tests whether all elements in an array are truthy.
The function returns immediately upon encountering a non-truthy value.
If provided an empty array, the function returns `true`.
Parameters
----------
x: Array|TypedArray|Object
Input array.
Returns
-------
bool: boolean
The function returns `true` if all elements are truthy; otherwise, the
function returns `false`.
Examples
--------
> var x = [ 1, 2, 3, 4 ];
> var out = {{alias}}( x )
true
See Also
--------