@bemoje/arr-every
v1.2.1
Published
Returns true if the predicate is satisfied for every element of the passed array; otherwise false.
Downloads
2
Maintainers
Readme
@bemoje/arr-every
Returns true if the predicate is satisfied for every element of the passed array; otherwise false.
Version
Travis CI
Dependencies
Stats
Donate
Installation
npm install @bemoje/arr-every
npm install --save @bemoje/arr-every
npm install --save-dev @bemoje/arr-every
Usage
import arrEvery from '@bemoje/arr-every'
const arr = [1, 2, 3, 4, 5]
arrEvery(arr, (num) => {
return num > 0
})
//=> true
arrEvery(arr, (num) => {
return num > 3
})
//=> false
Tests
Uses Jest to test module functionality. Run tests to get coverage details.
npm run test
API
arrEvery
Returns
true if the predicate is satisfied for every element of the passed array; otherwise false.
Parameters
Returns
predicate
Type: Function