# does-include

> find whether a string (or arr) contains any, or all of another array of strings.

Latest version **1.0.0** (published 2017-04-03) · 0 weekly downloads

## Install

```sh
npm install does-include
pnpm add does-include
yarn add does-include
bun add does-include
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-04-03 |
| First published | 2017-04-03 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Author | James |
| Maintainers | aretecode |
| Keywords | does-include, includes, any, all, includes-any, includes-all, string-includes-array, contains, string, strings, contains, array, fliphub, flipbox |

## Links

- npm: https://www.npmjs.com/package/does-include
- Repository: https://github.com/fliphub/fliphub
- Homepage: https://github.com/fliphub/fliphub#readme
- Issues: https://github.com/fliphub/fliphub/issues
- npm.io page: https://npm.io/package/does-include

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2017-04-03
- 0.0.1 — 2017-04-03

## README

# does include

[![NPM version][does-include-npm-image]][does-include-npm-url]
[![MIT License][license-image]][license-url]
[![fliphub][gitter-badge]][gitter-url]
[![flipfam][flipfam-image]][flipfam-url]

[does-include-npm-image]: https://img.shields.io/npm/v/does-include.svg
[does-include-npm-url]: https://npmjs.org/package/does-include
[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: https://spdx.org/licenses/MIT
[gitter-badge]: https://img.shields.io/gitter/room/fliphub/pink.svg
[gitter-url]: https://gitter.im/fliphub/Lobby
[flipfam-image]: https://img.shields.io/badge/%F0%9F%8F%97%20%F0%9F%92%A0-flipfam-9659F7.svg
[flipfam-url]: https://www.npmjs.com/package/flipfam

> find whether a string (or arr<string>) contains any, or all of another array of strings.


## 📦 usage
```bash
yarn add does-include
npm i does-include --save
```

```js
const does-include = require('does-include')
```


## 📘 examples

```js
/**
 * @param  {Array<string> | string} haystack
 * @param  {Array<string>} needles
 * @param  {boolean} any
 * @return {boolean}
 */
const doesInclude = require('does-include')

// or can be destructured
const {any, all} = require('does-include')
```

## any (default)
```js
const doesInclude = require('does-include')

// can is in canada, so true.
doesInclude('canada', ['eh', 'can'])
```

## all
```js
const doesInclude = require('does-include')

// last argument is `any` (default true)
// 'canada' and 'can' are both in it, so true
doesInclude('canada', ['canada', 'can'])
```

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