# @ndhoule/includes

> Determine whether or not a value is contained by a given collection.

Latest version **2.0.1** (published 2016-05-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ndhoule/includes
pnpm add @ndhoule/includes
yarn add @ndhoule/includes
bun add @ndhoule/includes
```

## 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 | 2.0.1 |
| Published | 2016-05-02 |
| First published | 2015-05-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Nathan Houle |
| Maintainers | ndhoule |
| Keywords | component, functional, includes |

## Links

- npm: https://www.npmjs.com/package/@ndhoule/includes
- Repository: https://github.com/ndhoule/includes
- Issues: https://github.com/ndhoule/includes/issues
- npm.io page: https://npm.io/package/@ndhoule/includes

## Dependencies (1)

- [@ndhoule/each](https://npm.io/package/@ndhoule/each.md) ^2.0.1

## Recent versions

- 2.0.1 (latest) — 2016-05-02
- 2.0.0 — 2016-05-02
- 1.0.0 — 2015-05-19

## README

# includes [![CI][ci-badge]][ci-link]

Determine whether or not a value is contained by a given collection.

Uses [SameValueZero][] (the algorithm used by Object.is) for equality comparisons.

## Installation

```sh
$ component install ndhoule/includes
$ npm install @ndhoule/includes
```

## API

### `includes(searchElement : *, collection : Object|Array|string) => boolean`

```javascript
includes(2, [1, 2, 3]);
//=> true

includes(4, [1, 2, 3]);
//=> false

includes(2, { a: 1, b: 2, c: 3 });
//=> true

includes('a', { a: 1, b: 2, c: 3 });
//=> false

includes('abc', 'xyzabc opq');
//=> true

includes('nope', 'xyzabc opq');
//=> false
```

## License

Released under the [MIT license](LICENSE.md).


[SameValueZero]: https://esdiscuss.org/topic/samevaluezero-comparator-and-compatibility
[ci-link]: https://travis-ci.org/ndhoule/includes
[ci-badge]: https://travis-ci.org/ndhoule/includes.svg?branch=master

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