Checks whether an element in a collection passes a test.
Checks whether an element in a collection passes a test.
Checks whether an element in a collection passes a test.
Checks whether an element in a collection passes a test.
Tests whether all elements in a collection fail a test implemented by a predicate function.
The predicate function is provided three arguments:
value
: collection valueindex
: collection indexcollection
: the input collectionThe function immediately returns upon encountering a truthy return value.
If provided an empty collection, the function returns true
.
input collection
test function
execution context
boolean indicating whether all elements fail a test
function isPositive( v ) {
return ( v > 0 );
}
var arr = [ -1, -2, -3, -4 ];
var bool = noneBy( arr, isPositive );
// returns true
Checks whether an element in a collection passes a test.
collection value
collection index
boolean indicating whether an element in a collection passes a test