{"name":"p-series","version":"1.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":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","series","serial","sequence","sequential","ordered","task","tasks","array","collection","iterable","iterator","async","await","promises","bluebird"],"dependencies":{"p-reduce":"^1.0.0"},"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"5941788d48d6d8eb8fea2056aee78fd4ac6fc222","bugs":{"url":"https://github.com/sindresorhus/p-series/issues"},"homepage":"https://github.com/sindresorhus/p-series#readme","_id":"p-series@1.0.0","_shasum":"7ec9e7b4406cc32066298a6f9860e55e91b36e07","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"7ec9e7b4406cc32066298a6f9860e55e91b36e07","tarball":"http://registry-npm.ywwl.com/p-series/download/p-series-1.0.0.tgz","integrity":"sha512-1kKlotoIO9IS7RUMNUiEmKoWnrvxmauHLkgIgH1vrjeqIxnXjElIv8GbfOo0hIMXfrGEGg+jYpexueEj9jY+/A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDvoL+C+xQzglE0qCrdon71P+HzwhMW6D8v4DtWTLuXwIhAKJIrwFP/cVEQuCqBo6gVLdfqvWd5PVMHWh4E2OgumDY"}],"size":1980,"noattachment":false,"key":"/p-series/-/p-series-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/p-series-1.0.0.tgz_1479800293552_0.3972700475715101"},"directories":{},"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":1479800293774,"_cnpm_publish_time":1479800293774,"dist-tags":{"latest":"3.0.0"}}