# for-limit

> A for loop which runs in parallel that allows you to limit the number of concurrent operations.

Latest version **1.0.0** (published 2014-12-03) · Apache 2.0 license · 0 weekly downloads

## Install

```sh
npm install for-limit
pnpm add for-limit
yarn add for-limit
bun add for-limit
```

## 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 | 2014-12-03 |
| First published | 2014-12-03 |
| Weekly downloads | 0 |
| License | Apache 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Timothy Strimple |
| Maintainers | tstrimple |
| Keywords | for, loop, async |

## Links

- npm: https://www.npmjs.com/package/for-limit
- Repository: https://github.com/tstrimple/for-limit
- Issues: https://github.com/tstrimple/for-limit/issues
- npm.io page: https://npm.io/package/for-limit

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2014-12-03

## README

## note ##
Currently the loop is inclusive. That means if you pass 1, 100 it will include both 1 and 100 in the iterator call.

# example usage #
    var forLimit = require('for-limit');

    function doSomething(i, next) {
      setTimeout(function() { 
      	console.log('something:', i); 
      	next(); }, 
      Math.random() * 1000); // simulate variable time asynchronous function
    }

    function allDone(err) {
      console.log('all done');
    }

    forLimit(1, 100, 10, doSomething, allDone);

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