{"_id":"p-all","_rev":"411572","name":"p-all","description":"Run promise-returning & async functions concurrently with optional limited concurrency","dist-tags":{"latest":"4.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2021-08-04T05:10:17.000Z","created":"2016-10-21T04:00:33.246Z","4.0.0":"2021-05-31T07:27:35.245Z","3.0.0":"2020-03-22T07:38:05.234Z","2.1.0":"2019-04-06T07:08:11.913Z","2.0.0":"2019-03-02T18:05:18.746Z","1.0.0":"2016-10-21T04:00:33.246Z"},"users":{"seangenabe":true,"ferx":true},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-all.git"},"versions":{"4.0.0":{"name":"p-all","version":"4.0.0","description":"Run promise-returning & async functions concurrently with optional limited concurrency","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-all.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12.20"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","all","function","func","fn","limited","limit","control","rate","collection","iterable","iterator","fulfilled","async","await","promises","concurrent","concurrently","concurrency","parallel","bluebird"],"dependencies":{"p-map":"^5.0.0"},"devDependencies":{"ava":"^3.15.0","delay":"^5.0.0","tsd":"^0.16.0","xo":"^0.40.1"},"gitHead":"df11988fd1de75e5318eb1786eae30f214a8d776","bugs":{"url":"https://github.com/sindresorhus/p-all/issues"},"homepage":"https://github.com/sindresorhus/p-all#readme","_id":"p-all@4.0.0","_nodeVersion":"12.22.1","_npmVersion":"7.10.0","dist":{"shasum":"fd0d57391727646da85cfe9595b9215617982c19","size":2443,"noattachment":false,"key":"/p-all/-/p-all-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-all/download/p-all-4.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-all_4.0.0_1622446055083_0.09560125965042987"},"_hasShrinkwrap":false,"publish_time":1622446055245,"_cnpm_publish_time":1622446055245},"3.0.0":{"name":"p-all","version":"3.0.0","description":"Run promise-returning & async functions concurrently with optional limited concurrency","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-all.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","all","function","func","fn","limited","limit","control","rate","collection","iterable","iterator","fulfilled","async","await","promises","concurrent","concurrently","concurrency","parallel","bluebird"],"dependencies":{"p-map":"^4.0.0"},"devDependencies":{"ava":"^1.4.1","delay":"^4.1.0","tsd":"^0.11.0","xo":"^0.28.0"},"gitHead":"8d8f123a6cc56d01576edf479476fa9a2e149947","bugs":{"url":"https://github.com/sindresorhus/p-all/issues"},"homepage":"https://github.com/sindresorhus/p-all#readme","_id":"p-all@3.0.0","_nodeVersion":"10.18.1","_npmVersion":"6.14.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"077c023c37e75e760193badab2bad3ccd5782bfb","size":2631,"noattachment":false,"key":"/p-all/-/p-all-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-all/download/p-all-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-all_3.0.0_1584862685133_0.6238690834209515"},"_hasShrinkwrap":false,"publish_time":1584862685234,"_cnpm_publish_time":1584862685234},"2.1.0":{"name":"p-all","version":"2.1.0","description":"Run promise-returning & async functions concurrently with optional limited concurrency","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-all.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","all","function","func","fn","limited","limit","control","rate","collection","iterable","iterator","fulfilled","async","await","promises","concurrent","concurrently","concurrency","parallel","bluebird"],"dependencies":{"p-map":"^2.0.0"},"devDependencies":{"ava":"^1.4.1","delay":"^4.1.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"8ff0daf4ae663841fa5f09fa856bbb3d8750c7bc","bugs":{"url":"https://github.com/sindresorhus/p-all/issues"},"homepage":"https://github.com/sindresorhus/p-all#readme","_id":"p-all@2.1.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"91419be56b7dee8fe4c5db875d55e0da084244a0","size":2629,"noattachment":false,"key":"/p-all/-/p-all-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-all/download/p-all-2.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-all_2.1.0_1554534491775_0.5350484940644584"},"_hasShrinkwrap":false,"publish_time":1554534491913,"_cnpm_publish_time":1554534491913},"2.0.0":{"name":"p-all","version":"2.0.0","description":"Run promise-returning & async functions concurrently with optional limited concurrency","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-all.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd-check"},"keywords":["promise","all","function","func","fn","limited","limit","control","rate","collection","iterable","iterator","fulfilled","async","await","promises","concurrent","concurrently","concurrency","parallel","bluebird"],"dependencies":{"p-map":"^2.0.0"},"devDependencies":{"ava":"^1.2.1","delay":"^4.1.0","tsd-check":"^0.3.0","xo":"^0.24.0"},"gitHead":"df07dc509a62e8a83c178c95c79488de553716f7","bugs":{"url":"https://github.com/sindresorhus/p-all/issues"},"homepage":"https://github.com/sindresorhus/p-all#readme","_id":"p-all@2.0.0","_nodeVersion":"10.15.1","_npmVersion":"6.8.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"e2e834d2dc1f2b9896c57611f727afac742a6e0a","size":2508,"noattachment":false,"key":"/p-all/-/p-all-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-all/download/p-all-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-all_2.0.0_1551549918574_0.7222103916313662"},"_hasShrinkwrap":false,"publish_time":1551549918746,"_cnpm_publish_time":1551549918746},"1.0.0":{"name":"p-all","version":"1.0.0","description":"Run promise-returning & async functions concurrently with optional limited concurrency","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-all.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","all","function","func","fn","limited","limit","control","rate","collection","iterable","iterator","fulfilled","async","await","promises","concurrent","concurrently","concurrency","parallel","bluebird"],"dependencies":{"p-map":"^1.0.0"},"devDependencies":{"ava":"*","delay":"^1.3.1","xo":"*"},"xo":{"esnext":true},"gitHead":"07c14a2c175536d4e20ded04966c8b08503cd391","bugs":{"url":"https://github.com/sindresorhus/p-all/issues"},"homepage":"https://github.com/sindresorhus/p-all#readme","_id":"p-all@1.0.0","_shasum":"93bdf53a55a23821fdfa98b4174a99bf7f31df8d","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.6.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"93bdf53a55a23821fdfa98b4174a99bf7f31df8d","size":2013,"noattachment":false,"key":"/p-all/-/p-all-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-all/download/p-all-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/p-all-1.0.0.tgz_1477022431094_0.6343138518277556"},"directories":{},"publish_time":1477022433246,"_cnpm_publish_time":1477022433246,"_hasShrinkwrap":false}},"readme":"# p-all\n\n> Run promise-returning & async functions concurrently with optional limited concurrency\n\nSimilar to `Promise.all()`, but accepts functions instead of promises directly so you can limit the concurrency.\n\nIf you're doing the same work in each function, use [`p-map`](https://github.com/sindresorhus/p-map) instead.\n\nSee [`p-series`](https://github.com/sindresorhus/p-series) for a serial counterpart.\n\n## Install\n\n```\n$ npm install p-all\n```\n\n## Usage\n\n```js\nimport pAll from 'p-all';\nimport got from 'got';\n\nconst actions = [\n\t() => got('https://sindresorhus.com'),\n\t() => got('https://avajs.dev'),\n\t() => checkSomething(),\n\t() => doSomethingElse()\n];\n\nconsole.log(await pAll(actions, {concurrency: 2}));\n```\n\n## API\n\n### pAll(tasks, options?)\n\nReturns a `Promise` that is fulfilled when all promises returned from calling the functions in `tasks` are fulfilled, or rejects if any of the promises reject. The fulfilled value is an `Array` of the fulfilled values in `tasks` order.\n\n#### tasks\n\nType: `Iterable<Function>`\n\nIterable with promise-returning/async functions.\n\n#### options\n\nType: `object`\n\n##### concurrency\n\nType: `number`\\\nDefault: `Infinity`\\\nMinimum: `1`\n\nNumber of concurrent pending promises.\n\n##### stopOnError\n\nType: `boolean`\\\nDefault: `true`\n\nWhen set to `false`, instead of stopping when a promise rejects, it will wait for all the promises to settle and then reject with an [aggregated error](https://github.com/sindresorhus/aggregate-error) containing all the errors from the rejected promises.\n\n## Related\n\n- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently\n- [p-series](https://github.com/sindresorhus/p-series) - Run promise-returning & async functions in series\n- [p-props](https://github.com/sindresorhus/p-props) - Like `Promise.all()` but for `Map` and `Object`\n- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control\n- [p-limit](https://github.com/sindresorhus/p-limit) - Run multiple promise-returning & async functions with limited concurrency\n- [More…](https://github.com/sindresorhus/promise-fun)\n","_attachments":{},"homepage":"https://github.com/sindresorhus/p-all#readme","bugs":{"url":"https://github.com/sindresorhus/p-all/issues"},"license":"MIT"}