Returns a function which tests if every element in an array-like object passes a test condition.
true
; otherwise, the function should return false
.true
if all elements pass the test and false
otherwise.false
if provided an empty array-like object.false
is not provided an array-like object.function to apply
an array-like object function
var isOdd = require( `@stdlib/assert/is-odd` );
var arr1 = [ 1, 3, 5, 7 ];
var arr2 = [ 3, 5, 8 ];
var validate = arraylikefcn( isOdd );
var bool = validate( arr1 );
// returns true
bool = validate( arr2 );
// returns false
Predicate function.
array element
test result