Package Exports
- arr-includes
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (arr-includes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
arr-includes

Return true if any of passed values exists in array. Using in-array.
Install
npm i arr-includes --save
Usage
For more use-cases see the tests
const arrIncludes = require('arr-includes')
arrIncludes
Check any of
values
exists onarr
. Also works as in-array.
Params
arr
{Array}: array to checkvalues
{Array|String}: array or anything that in-array supports.returns
{Boolean}: always boolean false or true, never throws
Example
var arrIncludes = require('arr-includes')
console.log(arrIncludes([1, 'bar', 3], 2)) // => false
console.log(arrIncludes([1, 'bar', 3], 3)) // => true
console.log(arrIncludes([1, 'bar', 3, true], false)) // => false
console.log(arrIncludes([1, 'bar', 3, true], true)) // => true
console.log(arrIncludes(['foo', 'bar'], 'baz')) // => false
console.log(arrIncludes(['foo', 'bar'], 'foo')) // => true
console.log(arrIncludes(['foo', 'bar', 'qux'], ['a', 'b', 'c'])) // => false
console.log(arrIncludes(['foo', 'bar', 'qux'], ['a', 'b', 'foo'])) // => true
Related
- in-array: Return true if a value exists in an array. Faster than using indexOf… more | homepage
- is-async-function: Is function really asynchronous function? Trying to guess that based on check if… more | homepage
- is-installed: Checks that given package is installed on the system - globally or locally. | homepage
- is-missing: Check that given
name
oruser/repo
exists in npm registry or in github… more | homepage - isarray: Array#isArray for older browsers | homepage
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.