1.0.1 • Published 6 years ago
@bemoje/arr-has v1.0.1
@bemoje/arr-has
Returns true if the element exists in the array
Version
Travis CI
Dependencies
Stats
Donate
Installation
npm install @bemoje/arr-has
npm install --save @bemoje/arr-has
npm install --save-dev @bemoje/arr-hasUsage
import arrHas from '@bemoje/arr-has'
const arr = [1, 2, 3]
arrHas(arr, 2)
//=> true
arrHas(arr, 4)
//=> false
arrHas(arr, 'asd')
//=> falseTests
Uses Jest to test module functionality. Run tests to get coverage details.
npm run testAPI
arrHas
Returns
true if the element exists in the array
Parameters
arrArray The array to searchelementany The element to find