{"_id":"run-parallel-limit","_rev":"237039","name":"run-parallel-limit","description":"Run an array of functions in parallel, but limit the number of tasks executing at the same time","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"feross","email":""}],"time":{"modified":"2023-03-24T16:32:53.000Z","created":"2015-06-24T07:20:36.378Z","1.1.0":"2021-02-10T03:04:12.255Z","1.0.6":"2020-10-27T03:46:04.097Z","1.0.5":"2018-04-26T01:13:35.302Z","1.0.4":"2018-03-15T18:22:37.289Z","1.0.3":"2016-03-29T09:10:35.768Z","1.0.2":"2015-09-22T20:40:32.161Z","1.0.1":"2015-06-24T08:00:30.969Z","1.0.0":"2015-06-24T07:20:36.378Z"},"users":{},"author":{"name":"Feross Aboukhadijeh","email":"feross@feross.org","url":"https://feross.org"},"repository":{"type":"git","url":"git://github.com/feross/run-parallel-limit.git"},"versions":{"1.1.0":{"name":"run-parallel-limit","description":"Run an array of functions in parallel, but limit the number of tasks executing at the same time","version":"1.1.0","author":{"name":"Feross Aboukhadijeh","email":"feross@feross.org","url":"https://feross.org"},"bugs":{"url":"https://github.com/feross/run-parallel-limit/issues"},"dependencies":{"queue-microtask":"^1.2.2"},"devDependencies":{"airtap":"^3.0.0","standard":"*","tape":"^5.1.1"},"homepage":"https://github.com/feross/run-parallel-limit","keywords":["parallel","async","function","callback","asynchronous","run","array","run parallel","limit","max","queue","run parallel limit","max tasks","tasks"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git://github.com/feross/run-parallel-limit.git"},"scripts":{"test":"standard && npm run test-node && npm run test-browser","test-browser":"airtap -- test/*.js","test-browser-local":"airtap --local -- test/*.js","test-node":"tape test/*.js"},"funding":[{"type":"github","url":"https://github.com/sponsors/feross"},{"type":"patreon","url":"https://www.patreon.com/feross"},{"type":"consulting","url":"https://feross.org/support"}],"gitHead":"565272661b17f6c54186717264cd929bd819f048","_id":"run-parallel-limit@1.1.0","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"shasum":"be80e936f5768623a38a963262d6bef8ff11e7ba","size":3184,"noattachment":false,"key":"/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/run-parallel-limit/download/run-parallel-limit-1.1.0.tgz"},"_npmUser":{"name":"feross","email":"feross@feross.org"},"directories":{},"maintainers":[{"name":"feross","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/run-parallel-limit_1.1.0_1612926252118_0.22289872557132928"},"_hasShrinkwrap":false,"publish_time":1612926252255,"_cnpm_publish_time":1612926252255,"_cnpmcore_publish_time":"2021-12-14T05:54:00.154Z"},"1.0.6":{"name":"run-parallel-limit","description":"Run an array of functions in parallel, but limit the number of tasks executing at the same time","version":"1.0.6","author":{"name":"Feross Aboukhadijeh","email":"feross@feross.org","url":"https://feross.org"},"bugs":{"url":"https://github.com/feross/run-parallel-limit/issues"},"dependencies":{},"devDependencies":{"airtap":"^3.0.0","standard":"*","tape":"^5.0.1"},"homepage":"https://github.com/feross/run-parallel-limit","keywords":["parallel","async","function","callback","asynchronous","run","array","run parallel","limit","max","queue","run parallel limit","max tasks","tasks"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git://github.com/feross/run-parallel-limit.git"},"scripts":{"test":"standard && npm run test-node && npm run test-browser","test-browser":"airtap -- test/*.js","test-browser-local":"airtap --local -- test/*.js","test-node":"tape test/*.js"},"funding":[{"type":"github","url":"https://github.com/sponsors/feross"},{"type":"patreon","url":"https://www.patreon.com/feross"},{"type":"consulting","url":"https://feross.org/support"}],"gitHead":"5061a20a2c9029e56373a79553bba667e59ed45e","_id":"run-parallel-limit@1.0.6","_nodeVersion":"14.14.0","_npmVersion":"6.14.8","dist":{"shasum":"0982a893d825b050cbaff1a35414832b195541b6","size":3153,"noattachment":false,"key":"/run-parallel-limit/-/run-parallel-limit-1.0.6.tgz","tarball":"http://name.csiicloud.com:7001/run-parallel-limit/download/run-parallel-limit-1.0.6.tgz"},"maintainers":[{"name":"feross","email":""}],"_npmUser":{"name":"feross","email":"feross@feross.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/run-parallel-limit_1.0.6_1603770363937_0.9338289162019682"},"_hasShrinkwrap":false,"publish_time":1603770364097,"_cnpm_publish_time":1603770364097,"_cnpmcore_publish_time":"2021-12-14T05:54:00.370Z"},"1.0.5":{"name":"run-parallel-limit","description":"Run an array of functions in parallel, but limit the number of tasks executing at the same time","version":"1.0.5","author":{"name":"Feross Aboukhadijeh","email":"feross@feross.org","url":"http://feross.org/"},"bugs":{"url":"https://github.com/feross/run-parallel-limit/issues"},"dependencies":{},"devDependencies":{"airtap":"0.0.4","standard":"*","tape":"^4.0.0"},"homepage":"https://github.com/feross/run-parallel-limit","keywords":["parallel","async","function","callback","asynchronous","run","array","run parallel","limit","max","queue","run parallel limit","max tasks","tasks"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git://github.com/feross/run-parallel-limit.git"},"scripts":{"test":"standard && npm run test-node && npm run test-browser","test-browser":"airtap -- test/*.js","test-browser-local":"airtap --local -- test/*.js","test-node":"tape test/*.js"},"gitHead":"6485e7ab35f6828af154f6cfe9cb7d98e8b4529b","_id":"run-parallel-limit@1.0.5","_npmVersion":"6.0.0","_nodeVersion":"8.11.1","_npmUser":{"name":"feross","email":"feross@feross.org"},"dist":{"shasum":"c29a4fd17b4df358cb52a8a697811a63c984f1b7","size":3062,"noattachment":false,"key":"/run-parallel-limit/-/run-parallel-limit-1.0.5.tgz","tarball":"http://name.csiicloud.com:7001/run-parallel-limit/download/run-parallel-limit-1.0.5.tgz"},"maintainers":[{"name":"feross","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/run-parallel-limit_1.0.5_1524705215208_0.03297736936852513"},"_hasShrinkwrap":false,"publish_time":1524705215302,"_cnpm_publish_time":1524705215302,"_cnpmcore_publish_time":"2021-12-14T05:54:00.566Z"},"1.0.4":{"name":"run-parallel-limit","description":"Run an array of functions in parallel, but limit the number of tasks executing at the same time","version":"1.0.4","author":{"name":"Feross Aboukhadijeh","email":"feross@feross.org","url":"http://feross.org/"},"bugs":{"url":"https://github.com/feross/run-parallel-limit/issues"},"dependencies":{},"devDependencies":{"airtap":"0.0.4","standard":"*","tape":"^4.0.0"},"homepage":"https://github.com/feross/run-parallel-limit","keywords":["parallel","async","function","callback","asynchronous","run","array","run parallel","limit","max","queue","run parallel limit","max tasks","tasks"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git://github.com/feross/run-parallel-limit.git"},"scripts":{"test":"standard && npm run test-node && npm run test-browser","test-browser":"airtap -- test/*.js","test-browser-local":"airtap --local -- test/*.js","test-node":"tape test/*.js"},"gitHead":"4d685359893673512f25eeaf8924790ce9325902","_id":"run-parallel-limit@1.0.4","_npmVersion":"5.7.1","_nodeVersion":"8.10.0","_npmUser":{"name":"feross","email":"feross@feross.org"},"dist":{"shasum":"d45f4cefdf70cedf386d5c87cdb5e64a8531b1aa","size":5312,"noattachment":false,"key":"/run-parallel-limit/-/run-parallel-limit-1.0.4.tgz","tarball":"http://name.csiicloud.com:7001/run-parallel-limit/download/run-parallel-limit-1.0.4.tgz"},"maintainers":[{"name":"feross","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/run-parallel-limit_1.0.4_1521138157241_0.3788282035466024"},"_hasShrinkwrap":false,"publish_time":1521138157289,"_cnpm_publish_time":1521138157289,"_cnpmcore_publish_time":"2021-12-14T05:54:00.768Z"},"1.0.3":{"name":"run-parallel-limit","description":"Run an array of functions in parallel, but limit the number of tasks executing at the same time","version":"1.0.3","author":{"name":"Feross Aboukhadijeh","email":"feross@feross.org","url":"http://feross.org/"},"bugs":{"url":"https://github.com/feross/run-parallel-limit/issues"},"dependencies":{},"devDependencies":{"standard":"^6.0.5","tape":"^4.0.0","zuul":"^3.1.0"},"homepage":"https://github.com/feross/run-parallel-limit","keywords":["parallel","async","function","callback","asynchronous","run","array","run parallel","limit","max","queue","run parallel limit","max tasks","tasks"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git://github.com/feross/run-parallel-limit.git"},"scripts":{"test":"standard && npm run test-node && npm run test-browser","test-browser":"zuul -- test/*.js","test-browser-local":"zuul --local -- test/*.js","test-node":"tape test/*.js"},"gitHead":"5d0fe689f70ed7f408f6a91e76b4ddcf0c68ef49","_id":"run-parallel-limit@1.0.3","_shasum":"6c3930cc7c0b47d35ae7420109f660aade2401e3","_from":".","_npmVersion":"2.15.1","_nodeVersion":"4.4.1","_npmUser":{"name":"feross","email":"feross@feross.org"},"dist":{"shasum":"6c3930cc7c0b47d35ae7420109f660aade2401e3","size":5282,"noattachment":false,"key":"/run-parallel-limit/-/run-parallel-limit-1.0.3.tgz","tarball":"http://name.csiicloud.com:7001/run-parallel-limit/download/run-parallel-limit-1.0.3.tgz"},"maintainers":[{"name":"feross","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/run-parallel-limit-1.0.3.tgz_1459242635376_0.03723435360006988"},"directories":{},"publish_time":1459242635768,"_hasShrinkwrap":false,"_cnpm_publish_time":1459242635768,"_cnpmcore_publish_time":"2021-12-14T05:54:00.989Z"},"1.0.2":{"name":"run-parallel-limit","description":"Run an array of functions in parallel, but limit the number of tasks executing at the same time","version":"1.0.2","author":{"name":"Feross Aboukhadijeh","email":"feross@feross.org","url":"http://feross.org/"},"bugs":{"url":"https://github.com/feross/run-parallel-limit/issues"},"dependencies":{},"devDependencies":{"standard":"^4.3.2","tape":"^4.0.0","zuul":"^3.1.0"},"homepage":"https://github.com/feross/run-parallel-limit","keywords":["parallel","async","function","callback","asynchronous","run","array","run parallel","limit","max","queue","run parallel limit","max tasks","tasks"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git://github.com/feross/run-parallel-limit.git"},"scripts":{"test":"standard && npm run test-node && npm run test-browser","test-browser":"zuul -- test/*.js","test-browser-local":"zuul --local -- test/*.js","test-node":"tape test/*.js"},"gitHead":"0b128a5583d23de7a2515ac8c9489a4dd36af1bc","_id":"run-parallel-limit@1.0.2","_shasum":"f3db26f9d83eb6ab4fa77bcd8d89c0e5aa92eeb9","_from":".","_npmVersion":"2.14.3","_nodeVersion":"4.1.0","_npmUser":{"name":"feross","email":"feross@feross.org"},"dist":{"shasum":"f3db26f9d83eb6ab4fa77bcd8d89c0e5aa92eeb9","size":5283,"noattachment":false,"key":"/run-parallel-limit/-/run-parallel-limit-1.0.2.tgz","tarball":"http://name.csiicloud.com:7001/run-parallel-limit/download/run-parallel-limit-1.0.2.tgz"},"maintainers":[{"name":"feross","email":""}],"directories":{},"publish_time":1442954432161,"_hasShrinkwrap":false,"_cnpm_publish_time":1442954432161,"_cnpmcore_publish_time":"2021-12-14T05:54:01.247Z"},"1.0.1":{"name":"run-parallel-limit","description":"Run an array of functions in parallel, but limit the number of tasks executing at the same time","version":"1.0.1","author":{"name":"Feross Aboukhadijeh","email":"feross@feross.org","url":"http://feross.org/"},"bugs":{"url":"https://github.com/feross/run-parallel-limit/issues"},"dependencies":{"dezalgo":"^1.0.1"},"devDependencies":{"standard":"^4.3.2","tape":"^4.0.0","zuul":"^3.1.0"},"homepage":"https://github.com/feross/run-parallel-limit","keywords":["parallel","async","function","callback","asynchronous","run","array","run parallel","limit","max","queue","run parallel limit","max tasks","tasks"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git://github.com/feross/run-parallel-limit.git"},"scripts":{"test":"standard && npm run test-node && npm run test-browser","test-browser":"zuul -- test/*.js","test-browser-local":"zuul --local -- test/*.js","test-node":"tape test/*.js"},"gitHead":"b4bb032ac2c6d89e9fdcf3b67c99b5ff98a15484","_id":"run-parallel-limit@1.0.1","_shasum":"95f175dadd96a3f1f92ceb7dde51d3e9d68e8e89","_from":".","_npmVersion":"2.11.3","_nodeVersion":"2.3.1","_npmUser":{"name":"feross","email":"feross@feross.org"},"maintainers":[{"name":"feross","email":""}],"dist":{"shasum":"95f175dadd96a3f1f92ceb7dde51d3e9d68e8e89","size":14723,"noattachment":false,"key":"/run-parallel-limit/-/run-parallel-limit-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/run-parallel-limit/download/run-parallel-limit-1.0.1.tgz"},"directories":{},"publish_time":1435132830969,"_hasShrinkwrap":false,"_cnpm_publish_time":1435132830969,"_cnpmcore_publish_time":"2021-12-14T05:54:01.565Z"},"1.0.0":{"name":"run-parallel-limit","description":"Run an array of functions in parallel, but limit the number of tasks executing at the same time","version":"1.0.0","author":{"name":"Feross Aboukhadijeh","email":"feross@feross.org","url":"http://feross.org/"},"bugs":{"url":"https://github.com/feross/run-parallel-limit/issues"},"dependencies":{"dezalgo":"^1.0.1"},"devDependencies":{"standard":"^4.3.2","tape":"^4.0.0","zuul":"^3.1.0"},"homepage":"https://github.com/feross/run-parallel-limit","keywords":["parallel","async","function","callback","asynchronous","run","array","run parallel","limit","max","queue","run parallel limit","max tasks","tasks"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git://github.com/feross/run-parallel-limit.git"},"scripts":{"test":"standard && npm run test-node && npm run test-browser","test-browser":"zuul -- test/*.js","test-browser-local":"zuul --local -- test/*.js","test-node":"tape test/*.js"},"gitHead":"ba333c3ea1d7d6afee5aead14aeea1e14e800c7c","_id":"run-parallel-limit@1.0.0","_shasum":"539b5faa84ba7fbb4580184f47a8cd0c7efb52ff","_from":".","_npmVersion":"2.11.3","_nodeVersion":"2.3.1","_npmUser":{"name":"feross","email":"feross@feross.org"},"maintainers":[{"name":"feross","email":""}],"dist":{"shasum":"539b5faa84ba7fbb4580184f47a8cd0c7efb52ff","size":7022,"noattachment":false,"key":"/run-parallel-limit/-/run-parallel-limit-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/run-parallel-limit/download/run-parallel-limit-1.0.0.tgz"},"directories":{},"publish_time":1435130436378,"_hasShrinkwrap":false,"_cnpm_publish_time":1435130436378,"_cnpmcore_publish_time":"2021-12-14T05:54:01.839Z"}},"readme":"# run-parallel-limit [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]\n\n[travis-image]: https://img.shields.io/travis/feross/run-parallel-limit/master.svg\n[travis-url]: https://travis-ci.org/feross/run-parallel-limit\n[npm-image]: https://img.shields.io/npm/v/run-parallel-limit.svg\n[npm-url]: https://npmjs.org/package/run-parallel-limit\n[downloads-image]: https://img.shields.io/npm/dm/run-parallel-limit.svg\n[downloads-url]: https://npmjs.org/package/run-parallel-limit\n[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg\n[standard-url]: https://standardjs.com\n\n### Run an array of functions in parallel, but limit the number of tasks executing at the same time\n\n![run-parallel-limit](img.png) [![Sauce Test Status](https://saucelabs.com/browser-matrix/run-parallel-limit.svg)](https://saucelabs.com/u/run-parallel-limit)\n\n### install\n\n```\nnpm install run-parallel-limit\n```\n\n### usage\n\n#### parallelLimit(tasks, limit, [callback])\n\nRun the `tasks` array of functions in parallel, with a maximum of `limit` tasks executing\nat the same time. If any of the functions pass an error to its callback, the main\n`callback` is immediately called with the value of the error. Once the `tasks` have\ncompleted, the results are passed to the final `callback` as an array.\n\nNote that the `tasks` are not executed in batches, so there is no guarantee that the first\n`limit` tasks will complete before any others are started.\n\nIt is also possible to use an object instead of an array. Each property will be run as a\nfunction and the results will be passed to the final `callback` as an object instead of\nan array. This can be a more readable way of handling the results.\n\n##### arguments\n\n- `tasks` - An array or object containing functions to run. Each function is passed a\n`callback(err, result)` which it must call on completion with an error `err` (which can\nbe `null`) and an optional `result` value.\n- `limit` - The maximum number of `tasks` to run at any time.\n- `callback(err, results)` - An optional callback to run once all the functions have\ncompleted. This function gets a results array (or object) containing all the result\narguments passed to the task callbacks.\n\n##### example\n\n```js\nvar parallelLimit = require('run-parallel-limit')\n\nvar tasks = [\n  function (callback) {\n    setTimeout(function () {\n      callback(null, 'one')\n    }, 200)\n  },\n  function (callback) {\n    setTimeout(function () {\n      callback(null, 'two')\n    }, 100)\n  },\n  ... hundreds more tasks ...\n]\n\nparallelLimit(tasks, 5, function (err, results) {\n  // optional callback\n  // the results array will equal ['one', 'two', ...] even though\n  // the second function had a shorter timeout.\n})\n```\n\nThe above code runs with a concurrency `limit` of 5, so at most 5 tasks will be running at\nany given time.\n\nThis module is basically equavalent to\n[`async.parallelLimit`](https://github.com/caolan/async#parallellimittasks-limit-callback),\nbut it's handy to just have the one function you need instead of the kitchen sink.\nModularity! Especially handy if you're serving to the browser and need to reduce your\njavascript bundle size.\n\nWorks great in the browser with [browserify](http://browserify.org/)!\n\n### see also\n\n- [run-auto](https://github.com/feross/run-auto)\n- [run-parallel](https://github.com/feross/run-parallel)\n- [run-series](https://github.com/feross/run-series)\n- [run-waterfall](https://github.com/feross/run-waterfall)\n\n### license\n\nMIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org).\n","_attachments":{},"homepage":"https://github.com/feross/run-parallel-limit","bugs":{"url":"https://github.com/feross/run-parallel-limit/issues"},"license":"MIT"}