is-array-elem
v1.0.2 array list include items elements values filter index indexof and 3 more...
is-array-elem
Checks if value is found in array, using SameValueZero
Installation
npm install --save is-array-elem
Usage
const isArrayElem = require('is-array-elem');
isArrayElem(['foo', 'bar'], 'foo');
//=> true
isArrayElem(['foo', 'bar'], 'bar');
//=> true
isArrayElem(['foo', 'bar'], 'baz');
//=> false
API
isArrayElem(array, value)
Parameters
Name | Type | Description |
---|---|---|
array | Array |
Array to inspect |
value | * |
Value to search for |
Returns
Boolean
Related
- lodash.indexof - Gets the index of value in array
License
MIT © Lufty Wiranda