Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

is-array-elem

luftywiranda1310MIT1.0.2

Checks if value is found in array

array, list, include, items, elements, values, filter, index, indexof, index-of, lodash.indexof

readme

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

License

MIT © Lufty Wiranda