# check-iterable

> A toolbox to check if an object is iterable, an iterator or a generator, etc.

Latest version **1.2.0** (published 2023-09-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install check-iterable
pnpm add check-iterable
yarn add check-iterable
bun add check-iterable
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2023-09-19 |
| First published | 2019-04-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | A-yon Lee |
| Maintainers | ayonli |
| Keywords | iterable, iterator, generator, IterableIterator, AsyncIterable, AsyncIterator, AsyncIterableIterator |

## Links

- npm: https://www.npmjs.com/package/check-iterable
- Repository: https://github.com/ayonli/check-iterable
- Homepage: https://github.com/ayonli/check-iterable#readme
- Issues: https://github.com/ayonli/check-iterable/issues
- npm.io page: https://npm.io/package/check-iterable

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 1.2.0 (latest) — 2023-09-19
- 1.1.0 — 2023-06-02
- 1.0.5 — 2020-11-28
- 1.0.4 — 2020-11-28
- 1.0.2 — 2019-05-20
- 1.0.1 — 2019-04-22
- 1.0.0 — 2019-04-22

## README

# Check Iterable

**A toolbox to check if an object is iterable, an iterator or a generator, etc.**

## Install

### Node.js

```sh
npm i check-iterable
```

### Deno

```ts
import * as CheckIterable from "https://deno.land/x/check_iterable/index.js";
```

## API

- `isIterable(obj: any): boolean` Checks if the given object is an Iterable 
    (implemented `@@iterator`).
- `isAsyncIterable(obj: any): boolean` Checks if the given object is an 
    AsyncIterable (implemented `@@asyncIterator`).
- `isIteratorLike(obj: any): boolean` Checks if the given object is an 
    IteratorLike (implemented `next`).
- `isIterableIterator(obj: any): boolean` Checks if the given object is an 
    IterableIterator (implemented both `@@iterator` and `next`).
- `isAsyncIterableIterator(obj: any): boolean` Checks if the given object is an
    AsyncIterableIterator (implemented both `@@asyncIterator` and `next`).
- `isGenerator(obj: any): boolean` Checks if the given object is a Generator.
- `isAsyncGenerator(obj: any): boolean` Checks if the given object is an 
    AsyncGenerator.

**Note:**

These functions are designed to test whether an object suits the specifications
suggested on [MDN](https://developer.mozilla.org) in sloppy mode, go to MDN for
more details.

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