is-array-elem

v1.0.2
Checks if value is found in array
array list include items elements values filter index indexof and 3 more...

is-array-elem

npm Travis branch npm

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

License

MIT © Lufty Wiranda

npm i is-array-elem

Metadata

  • MIT
  • >=4
  • Lufty Wiranda
  • released 8/23/2017

Downloads

Maintainers