is-array-elem

1.0.2 • Public • Published

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

Package Sidebar

Install

npm i is-array-elem

Weekly Downloads

5

Version

1.0.2

License

MIT

Last publish

Collaborators

  • luftywiranda13