{"name":"p-series","version":"2.0.0","description":"Run promise-returning & async functions in series","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-series.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd-check"},"keywords":["promise","series","serial","sequence","sequential","ordered","task","tasks","array","collection","iterable","iterator","async","await","promises","bluebird"],"dependencies":{"@sindresorhus/is":"^0.15.0","p-reduce":"^2.0.0"},"devDependencies":{"ava":"^1.3.1","tsd-check":"^0.3.0","xo":"^0.24.0"},"gitHead":"3243708d2639ce577c3f2536be0d4e773145f0a6","bugs":{"url":"https://github.com/sindresorhus/p-series/issues"},"homepage":"https://github.com/sindresorhus/p-series#readme","_id":"p-series@2.0.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-Wtk9lIcWrZXujgTFUtOo2Y913Y5zGAFPg8yngbA8Le8n5hsv0Qfuhg9DhtMi22vwBU6SmTqvHgTvW8rsl72ekA==","shasum":"9eb2f2401fa0e64743c11a6b88676d36dd21a840","tarball":"http://registry-npm.ywwl.com/p-series/download/p-series-2.0.0.tgz","fileCount":5,"unpackedSize":4596,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJch3eFCRA9TVsSAnZWagAAqxAQAJw5iClLyL6+wh1H7SGD\n7fLazk3xhAl1NnbYB/jmsSR1Rlpm76njL8ZF3VUJcpdqhakj/WtPnFLPJxVP\nNZn1fUQTbWW0ADt6TR2BRV2GDwWReGKvKk5QTaOe11fWQOmyZYRyIFa1LM4/\nS69ahbhvfJivUcsVgzcxTKTSvF6RaYD317/RsPgOFXU/Y7SYHoYWIlKCECqa\n6QFhW+INCMelCy5Jdf2yJC9X3yh1J4sU9Esx7Hj/9Opmu7unrp/iSIgW8pmd\nzL20+R5HosBKeF/sT59TGqR9Ti+bcWI0XFgZk3Rzhk2s4PU49XxsnwyghBxL\nBKoIWZ4S9YnNXgfIB6lGbYePz3kcvg6/gQL+PQpIWL66jQ2IZB6d/YIK+157\nWKBsJW6ntKOIRc7ggu+OMFIV6tu+pUC+SO2mMD3E1IbW1XBazTIbbr6ofWIp\nYZmiEr1FSU9BXRQQwPRunuDyejeiXcx79e535MwrC3ruhkZG+LG52Nis+QIX\nl/oKcmmWgBonmnDQ+jXFQfYCLDWIWD40QfZjbhO5ipggybx/CQji2QXSMJn3\nG3pw0O5EQHbQqfy5l1kl+SjCA8lo78FZJo/zoKaqtWg8Hzb22dxvVuhOya4f\n9O5fZe/G2gjsPBG6zu8GVmWA53VURRwdqmEMtY4ucWfGcYeiE/K2OfWmwWyV\nHOn+\r\n=d3Fw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAXjZmuM7+0Aj/nWlpa5v+ZdhrykScoMxFPQBr+xI2PjAiAxdGKNlSr9Ob0F8oHCtUY/2DUcbbwgx4G4Ze1CBV1aWw=="}],"size":2180,"noattachment":false,"key":"/p-series/-/p-series-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-series_2.0.0_1552381828812_0.388071873278673"},"_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":1552381828946,"_cnpm_publish_time":1552381828946,"dist-tags":{"latest":"3.0.0"}}