# maximize-iterator

> Maximize the parallel calls of an iterator supporting asyncIterator interface

Latest version **5.0.9** (published 2026-10-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install maximize-iterator
pnpm add maximize-iterator
yarn add maximize-iterator
bun add maximize-iterator
```

## Health

**Score 70/100 (B)** — status: active.

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 5.0.9 |
| Published | 2026-10-12 |
| First published | 2020-04-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=0.8 |
| Dependencies | 2 |
| Unpacked size | 49.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Kevin Malakoff |
| Maintainers | kmalakoff |
| Keywords | maximize, limit, parallel, concurrent, iterator, asyncIterator, Symbol.asyncIterator |

## Links

- npm: https://www.npmjs.com/package/maximize-iterator
- Repository: https://github.com/kmalakoff/maximize-iterator
- Issues: https://github.com/kmalakoff/maximize-iterator/issues
- npm.io page: https://npm.io/package/maximize-iterator

## Dependencies (2)

- [async-compat](https://npm.io/package/async-compat.md) ^1.4.6
- [iterator-next-callback](https://npm.io/package/iterator-next-callback.md) ^3.0.0

## Alternatives

- [promise-throttle](https://npm.io/package/promise-throttle.md) — 44.2K weekly downloads
- [@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

## Recent versions

- 5.0.9 (latest) — 2026-10-12
- 5.0.8 — 2026-09-12
- 5.0.7 — 2026-05-26
- 5.0.6 — 2026-05-26
- 5.0.5 — 2025-12-26
- 5.0.4 — 2025-12-20
- 5.0.2 — 2025-12-18
- 5.0.1 — 2025-12-18
- 5.0.0 — 2025-12-18
- 4.2.0 — 2025-12-17
- 4.1.0 — 2025-12-15
- 4.0.14 — 2025-12-12
- 4.0.13 — 2025-12-12
- 4.0.12 — 2025-12-04
- 4.0.11 — 2025-12-04
- … 55 more at https://npm.io/package/maximize-iterator/versions

## README

## maximize-iterator

Maximize the parallel calls of an iterator supporting asyncIterator interface.

```sh
npm install maximize-iterator
```

```js
const maximize = require('maximize-iterator');

async function* values() {
  yield* [1, 2, 3, 4];
}

async function main() {
  const results = [];
  await maximize(values(), (value) => results.push(value), { concurrency: 2 });
  console.log(results); // [1, 2, 3, 4]
}

main().catch(console.error);
```

## Options

- bool: callbacks - use an each function with a callback `function(entry, callback)` (default: false)
- function: error - handle iterator or item errors. Return true to stop processing (default: stop on error).
- function: canProcess - return false to pause requesting more iterator values (default: always process).
- number: concurrency - parallelism of processing. (default: 4096)
- number: limit - maximum number to process. (default: Infinity)

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