@bemoje/arr-every

1.2.1 • Public • Published

@bemoje/arr-every

Returns true if the predicate is satisfied for every element of the passed array; otherwise false.

Version

NPM version

Travis CI

dependencies

Dependencies

dependencies

Stats

NPM downloads Forks

Donate

Buy Me A Beer donate button PayPal donate button

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

boolean

predicate

Type: Function

Parameters
  • element any The array element

  • index number The element's index in the array

  • arr Array The array

Returns

boolean

Package Sidebar

Install

npm i @bemoje/arr-every

Weekly Downloads

0

Version

1.2.1

License

MIT

Unpacked Size

8.93 kB

Total Files

5

Last publish

Collaborators

  • bemoje