{"name":"p-all","version":"5.0.1","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","types":"./index.d.ts","sideEffects":false,"engines":{"node":">=16"},"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":"^6.0.0"},"devDependencies":{"ava":"^5.2.0","delay":"^5.0.0","tsd":"^0.28.1","xo":"^0.54.1"},"_id":"p-all@5.0.1","gitHead":"4baaae654de70276978578019c4264af3442fc06","bugs":{"url":"https://github.com/sindresorhus/p-all/issues"},"homepage":"https://github.com/sindresorhus/p-all#readme","_nodeVersion":"20.19.5","_npmVersion":"10.9.2","dist":{"integrity":"sha512-LMT7WX9ZSaq3J1zjloApkIVmtz0ZdMFSIqbuiEa3txGYPLjUPOvgOPOx3nFjo+f37ZYL+1aY666I2SG7GVwLOA==","shasum":"688c4032f32d321fc69ef3d896aa5b2fe0b8406b","tarball":"http://registry-npm.ywwl.com/p-all/download/p-all-5.0.1.tgz","fileCount":5,"unpackedSize":5600,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDNH5ofgSNg3LcFtxC8LKZlqeS+nWyF92nl4YCtvax6AAIhAPFqy4c+itc8yqVKbMoeYgsusLQH8vJJZ/yu5VoGU26W"}],"size":2436,"noattachment":false,"key":"/p-all/-/p-all-5.0.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/p-all_5.0.1_1758174954648_0.42156762087106525"},"_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```sh\nnpm 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` *(Integer)*\\\nDefault: `Infinity`\\\nMinimum: `1`\n\nNumber of concurrently 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 [`AggregateError`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/AggregateError) containing all the errors from the rejected promises.\n\n##### signal\n\nType: [`AbortSignal`](https://developer.mozilla.org/docs/Web/API/AbortSignal)\n\nYou can abort the promises using [`AbortController`](https://developer.mozilla.org/docs/Web/API/AbortController).\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","publish_time":1758174954822,"_cnpm_publish_time":1758174954822,"dist-tags":{"latest":"5.0.1"}}