{"name":"p-series","version":"3.0.0","description":"Run promise-returning & async functions in series","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-series.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.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","series","serial","sequence","sequential","ordered","task","tasks","array","collection","iterable","iterator","async","await","promises","bluebird"],"devDependencies":{"ava":"^3.15.0","tsd":"^0.17.0","xo":"^0.44.0"},"gitHead":"212bcf2a0712af8451f90c72f2b2b8006b1c7f60","bugs":{"url":"https://github.com/sindresorhus/p-series/issues"},"homepage":"https://github.com/sindresorhus/p-series#readme","_id":"p-series@3.0.0","_nodeVersion":"12.22.1","_npmVersion":"7.10.0","dist":{"integrity":"sha512-geaabIwiqy+jN4vuJROl1rpMJT/myHAMAfdubPQGJT3Grr8td+ogWvTk2qLsNlhYXcoZZAfl01pfq7lK3/gYKQ==","shasum":"ca5669abbc4342a48f5475d4d7c4c52442a4e48c","tarball":"http://registry-npm.ywwl.com/p-series/download/p-series-3.0.0.tgz","fileCount":5,"unpackedSize":4610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFa9nCRA9TVsSAnZWagAAa+8P+wecTbsB5gcZQAA0ZpVF\nzoft44i1friV8Nv67MngBQX1JLBqv4dJON0LcdYWWSE9BYbJEOZ+JTjGfLov\n3aiF6I3xewB+EmH2Lelx6AglgD1P8RZQAUxs8TOS/kaLaXxVGZ7vIJXmYqVx\n8Mi+smUY95OxtE1g1QsWzXCs1jffIt+YN74jj+IOckUHWdNS3dHoA3OamVPM\nzNxrpYdslctrPDAhx3RoDdeO3huGGL7U9sHCELfrCIrPY/IQavaRo5qqR8ZS\nkoHw2/t8nS6gcVF81YvWPPLUQN5/2cJV7OoHaRb7IRJ/DMt8AXIml7PFT6AH\nANzgXjmusSlD5nR63HXpBro6iMu3XsS7O1bi+QpplJoIKz4yZRN9f9QkIVUN\nOTh4qejSm/ekVvK4KjiEEBnUZMf0GaILOXNUESCfaWvzRBBXU2vGt5czSy0o\nUBywaxIiFjMpGfnZjPpoX2ePFXXAXF3so+sHWUjheLVO8UQ5OdiFVRggc5Ry\ngQplm5KT/5cNNoX1qY1+uHaLTNccuu9fEEvh5D3wBLz+zA7oLTGCRaEUHTp/\nKlBFeQKDbbkxAxH0qz88Vmub8qTCIRI/tNXM0KeRQlSX3j88VeU94CK/iipq\n+mcEAMy7m/rW57gVWQ6NRXBqvcKd7LLCtq6t/IriHMT/l/YC3Pl3VcZuNprI\nBWdL\r\n=ZARK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYEuE3J4BGGLXK0vvYw8T11e7Me2XL8g0LnKGcyOXUqQIhALr12bc5mWrSRUuVk1T4dcIwAj7gVEMNsrd3U6uzECq0"}],"size":2115,"noattachment":false,"key":"/p-series/-/p-series-3.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-series_3.0.0_1628811111492_0.5648683407803234"},"_hasShrinkwrap":false,"readme":"# p-series\n\n> Run promise-returning & async functions in series\n\n*Note:* You can just use `await` in a for-loop to get the same behavior. This package was useful before async/await existed.\n\nIf you're doing the same work in each function, use [`p-each-series`](https://github.com/sindresorhus/p-each-series) instead.\n\nSee [`p-all`](https://github.com/sindresorhus/p-all) for a concurrent counterpart.\n\n## Install\n\n```\n$ npm install p-series\n```\n\n## Usage\n\n```js\nimport pSeries from 'p-series';\nimport got from 'got';\n\nconst tasks = [\n\t() => got('https://sindresorhus.com'),\n\t() => checkSomething(),\n\t() => doSomethingElse()\n];\n\nconsole.log(await pSeries(tasks));\n```\n\n## API\n\n### pSeries(tasks)\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.\n\n#### tasks\n\nType: `Iterable<Function>`\n\nFunctions are expected to return a value. If a Promise is returned, it's awaited before continuing with the next task.\n\n## Related\n\n- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency\n- [p-waterfall](https://github.com/sindresorhus/p-waterfall) - Run promise-returning & async functions in series, each passing its result to the next\n- [p-each-series](https://github.com/sindresorhus/p-each-series) - Iterate over promises serially\n- [More…](https://github.com/sindresorhus/promise-fun)\n","publish_time":1628811111690,"_cnpm_publish_time":1628811111690,"dist-tags":{"latest":"3.0.0"}}