{"name":"p-series","version":"2.1.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"},"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.1.0"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"4077b6b90507c195ffbc37a9e759715e4c360fc4","bugs":{"url":"https://github.com/sindresorhus/p-series/issues"},"homepage":"https://github.com/sindresorhus/p-series#readme","_id":"p-series@2.1.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-vEAnkG1ikRT1kPBrKwpj7AFYQkd1hjt/oHeppxtpoPxy5gEt+OWiHZJN3tMqvFa+UJfVwO3lwHoMUpMYBLKnaQ==","shasum":"7035b3a81e2644d4ba407c1ebbc21776e353fa29","tarball":"http://registry-npm.ywwl.com/p-series/download/p-series-2.1.0.tgz","fileCount":5,"unpackedSize":5169,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp8tdCRA9TVsSAnZWagAA1aMP/2QKfHNGPoPaQMeJJf1a\nMILsdiTum39sBRVQuROLgNhBIZiJCy54rwIGnvBmn0aZlvC1dYz2fHxmGc1z\nS+r2tE9V3slIVNUMWQveqIsbBZ5muezROEMEMDseYl5Wjz8+dhE75H8mQXUN\n58+PdY0WPVYyqnmSToAXbWLY3TCqMAELQPwpYpWt5bWlMspcBZYW836cnoE3\nD544kowFTkN1UbeJZOPFr2HY4b+W14KXIwFnMEUkYQbNbyqCyNHp9u9L9YRh\nLBGmAHHflT1J4L6zM+qx1F+gNdmsXeXohqx+Ealv2wheX9ZyRNNL4FncU9xg\nRqbjmIkREcYdt4PGjKA+FU3aCd2m3N58UnCeIWXkcJD2HCKzhy0wwo12dARA\nHUXzUCHjPicPvqxOOKCwXk+soKVoeydAjteKCqJMv12MpPCaSz7qMYrWWM2j\nlNhUhn1el7+kDO3X+hBvTh4S0VHlTwsDsH+QVSy2i/ibdXtmBBedPRh+eteK\nkIphRpyNqDcBQB/XIUurJYrRgFO2vB2Ugw7xeEWGpbDoJT+o7p+rojSuDpcD\nRsJLuJbY7BvCCqriwaVHbaLmkEbxC5+Yco5+3MFE8T8Mg0WE5w6hV/YQofdf\nsbTCu48ZqdZD6rcWKD65UgejKWBaSqjDIv2nBPaTLVS+H70L3rqsLhicPrSE\nc+dy\r\n=4Bpo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3UIpmvABZsfdRxUX4aDtw79N56G6t5yIBi8s4eGjbFwIhAO+RJJSxXHkRv7XA8E8zaOchpQyegOWEO9C5M960M92y"}],"size":2324,"noattachment":false,"key":"/p-series/-/p-series-2.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-series_2.1.0_1554500444088_0.6304887927230405"},"_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":1554500444269,"_cnpm_publish_time":1554500444269,"dist-tags":{"latest":"3.0.0"}}