# is-iterable-with

> Checks if a value is an iterable that outputs exactly the specified values.

Latest version **1.0.0** (published 2018-08-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-iterable-with
pnpm add is-iterable-with
yarn add is-iterable-with
bun add is-iterable-with
```

## 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 | 2018-08-22 |
| First published | 2018-08-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 2 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Fr. John Lamansky |
| Maintainers | lamansky |
| Keywords | iterable, value, check, test |

## Links

- npm: https://www.npmjs.com/package/is-iterable-with
- Repository: https://github.com/lamansky/is-iterable-with
- Issues: https://github.com/lamansky/is-iterable-with/issues
- npm.io page: https://npm.io/package/is-iterable-with

## Dependencies (2)

- [sbo](https://npm.io/package/sbo.md) ^1.1.0
- [is-iterable](https://npm.io/package/is-iterable.md) ^1.1.1

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-08-22

## README

# is-iterable-with

Checks if a value is an iterable that outputs exactly the specified values.

## Installation

Requires [Node.js](https://nodejs.org/) 6.0.0 or above.

```bash
npm i is-iterable-with
```

## API

The module exports a single function.

### Parameters

1. Bindable: `iterable` (any): The value that should be an iterable.
2. Variadic: `...values`: The values that should be iterated.

### Return Value

Returns `true` if `iterable` is an iterable and if its outputted values exactly equal the `values` arguments. Otherwise `false`.

## Example

```javascript
const isIterableWith = require('is-iterable-with')

const arr = [1, 2, 3]

isIterableWith(arr, 1, 2, 3) // true

isIterableWith(123) // false
isIterableWith(arr, 1, 2) // false
isIterableWith(arr, 1, 2, 3, 4) // false
isIterableWith(arr, 2, 1, 3) // false

// Supports the bind operator
arr::isIterableWith(1, 2, 3) // true
```

## Related

* [is-array-with](https://github.com/lamansky/is-array-with)

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