{"_id":"items-promise","_rev":"3-976d38d1e459f0e4713169179e84e828","name":"items-promise","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"items-promise","version":"1.0.0","author":{"name":"Pooya Parsa","email":"pooya@pi0.ir"},"license":"MIT","_id":"items-promise@1.0.0","maintainers":[{"name":"pi0","email":"pyapar@gmail.com"}],"homepage":"https://github.com/pi0/items-promise#readme","bugs":{"url":"https://github.com/pi0/items-promise/issues"},"dist":{"shasum":"a71ff03063078eb82db468f1e2f12df4da34dc01","tarball":"https://registry.npmjs.org/items-promise/-/items-promise-1.0.0.tgz","integrity":"sha512-t+3w4E51IlviTn1b/gesEsH9Jf0gEs2+VhSbwgMaVyK2IxXYSwZkL6sOmr+FBhMT0sSFzcc4Rn5X7sz6NvS2GQ==","signatures":[{"sig":"MEUCIF6dSFnn2SGVv6xp4k98RXHLQXas0Q8/k0+XN5SMA+uiAiEApHeuJdIkV99VNpNqo9EgAsxpklXiGYS5wvUW5hx754Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","gitHead":"953445813d545dcd768625c350bc092dd2912ccd","_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"repository":{"url":"git+https://github.com/pi0/items-promise.git","type":"git"},"_npmVersion":"5.3.0","description":"Bare minimum async methods using promises","_nodeVersion":"8.3.0","_npmOperationalInternal":{"tmp":"tmp/items-promise-1.0.0.tgz_1504437181313_0.7281142233405262","host":"s3://npm-registry-packages"},"directories":{}}},"time":{"created":"2017-09-03T11:13:02.233Z","modified":"2026-04-20T03:07:40.592Z","1.0.0":"2017-09-03T11:13:02.233Z"},"bugs":{"url":"https://github.com/pi0/items-promise/issues"},"author":{"name":"Pooya Parsa","email":"pooya@pi0.ir"},"license":"MIT","homepage":"https://github.com/pi0/items-promise#readme","repository":{"url":"git+https://github.com/pi0/items-promise.git","type":"git"},"description":"Bare minimum async methods using promises","maintainers":[{"email":"atinux@gmail.com","name":"atinux"},{"email":"pyapar@gmail.com","name":"pi0"},{"email":"clark.duxin@gmail.com","name":"clarkdo"}],"readme":"# items-promise\nBare minimum async methods using promises. (Inspired by [items](https://www.npmjs.com/package/items))\n\n```bash\n>_ yarn add items-promise\n```\n\nOR using NPM\n\n```bash\n>_ npm install items-promise\n```\n\n```js\nconst { serial, parallel } = require('items-promise')\n\n// OR\n\nimport { serial, parallel } from 'items-promise'\n```\n\n# Usage\n`tasks` should be always an array and `fn` should be a function witch returns a **Promise** object.\n\n## serial(tasks, fn)\n\nRun tasks one by one by calling `fn(task, previous)` in a promise chain.\n\nReturn value is of type `Promise<*>` which resolves to the **last** fn result.\n\n## parallel(tasks, fn)\n\nRun all tasks in parallel by calling `fn(tasks)` and await using `Promise.all`.\n\nReturn value is of type `Promise<Array[*]>` which resolves to results of **all** fns in an array.\n\n\n# License\nReleased under The MIT [LICENSE](./LICENSE)\n\nCopyright (c) 2017 Pooya Parsa\n","readmeFilename":"README.md"}