# array-includes-all

> Check if an array includes all the elements of another array

Latest version **2.0.0** (published 2018-04-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install array-includes-all
pnpm add array-includes-all
yarn add array-includes-all
bun add array-includes-all
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2018-04-17 |
| First published | 2016-03-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Shinnosuke Watanabe |
| Maintainers | shinnn |
| Keywords | arr, array, check, true, false, bool, boolean, if, include, includes, have, has, contain, contains, browser, client-side |

## Links

- npm: https://www.npmjs.com/package/array-includes-all
- Repository: https://github.com/shinnn/array-includes-all
- Homepage: https://github.com/shinnn/array-includes-all#readme
- Issues: https://github.com/shinnn/array-includes-all/issues
- npm.io page: https://npm.io/package/array-includes-all

## Dependencies (1)

- [append-type](https://npm.io/package/append-type.md) ^1.0.1

## Recent versions

- 2.0.0 (latest) — 2018-04-17
- 2.0.0-1 — 2018-04-12
- 2.0.0-0 — 2018-04-10
- 1.0.0 — 2016-03-16
- 0.0.0 — 2016-03-16

## README

# array-includes-all

[![npm version](https://img.shields.io/npm/v/array-includes-all.svg)](https://www.npmjs.com/package/array-includes-all)
[![Build Status](https://travis-ci.org/shinnn/array-includes-all.svg?branch=master)](https://travis-ci.org/shinnn/array-includes-all)
[![Coverage Status](https://img.shields.io/coveralls/shinnn/array-includes-all.svg)](https://coveralls.io/r/shinnn/array-includes-all)

Check if an [`Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) includes all the elements of another array

```javascript
arrayIncludesAll(['a', 'b', 'c'], ['a', 'b']); //=> true
arrayIncludesAll(['a', 'b', 'c'], ['a', 'b', 'd']); //=> false

arrayIncludesAll([1, 2, NaN], [NaN]); //=> true
```

## Installation

[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/getting-started/what-is-npm).

```
npm install array-includes-all
```

## API

```javascript
import arrayIncludesAll from 'array-includes-all';
```

### arrayIncludesAll(*array*, *searchElements* [, *fromIndex*])

*array*: `Array`  
*searchElements*: `Array` (the elements to search for)  
*fromIndex*: `integer` (the position in the array at which to begin searching)  
Return: `boolean`

The API is similar to [`Array.prototype.includes.call`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/includes), except that the second argument takes an array of the elements to search for instead of a single element.

```javascript
arrayIncludesAll([1, 2], [1, 2]); //=> true
arrayIncludesAll([1, 2], [1, 2], 1); //=> false
```

## License

[ISC License](./LICENSE) © 2018 Shinnosuke Watanabe

---
_Source: https://npm.io/package/array-includes-all · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
