{"_id":"@adent/promises","_rev":"1-551dc58a36cf4e230bcd790d24686a16","name":"@adent/promises","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@adent/promises","version":"1.0.1","description":"Promises package","main":"promises.js","scripts":{"test":"node test.js"},"repository":{"type":"git","url":"git+https://github.com/maly/es-promises.git"},"keywords":["ES","JavaScript","Promises"],"author":{"name":"Martin Maly"},"license":"MIT","bugs":{"url":"https://github.com/maly/es-promises/issues"},"homepage":"https://github.com/maly/es-promises#readme","gitHead":"0406a03149503c48fe462a0af46aea6112e0088c","_id":"@adent/promises@1.0.1","_nodeVersion":"8.12.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-o1dI7OY5vdWPi6QC6MszhA159kVaP+L1TFBXYk5IUw2hmeYTmdCbXs/se8crJT9VT8BbHni0XsJHUxAdQcH06g==","shasum":"9777d16fd4f63f8eddd3cba8053a4e7de1b56e38","tarball":"https://registry.npmjs.org/@adent/promises/-/promises-1.0.1.tgz","fileCount":6,"unpackedSize":7211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJekIP1CRA9TVsSAnZWagAAzNQP/A556oc9ML6AeK9RUMpr\nJX+HTznaqWapsV5W8SmVUhNOqK6AER+0JDk4EH1dvM2PM5GptlZuaBqDyvso\n/dSz3JDSzzFXXLAR9B8/nfBUfHCbfVYYD1o8yUBnsFv4rD0Pn+tUpr+0Rgpf\nXvmSmrxfwrl8uLG4ACZ6gBFUjAi0n/4i8qS1BCXp34M7PHTp0JoWkYUKH4xI\nsxoDYIqT2DroD0kMuPNFlM4LZxdG82LN85YATUFmmkUcYs2wS0HDCOlNuAaB\nSyoIZiy2T14AHBS+XNwR6lA9NUGsD0dZgtWbI9cx6x9g7QATMLlVOAu/iMxw\nFVTL6exmtaGedafZno9/ULBtlAh28VdXjePozZDFHfU+IZrv9Q7z6NvzAB5G\nuEYPIrHFLflrTGPctXV/8oSbhgV3CldPw8mrqQozFKOdcT97Ju3iJpgOX/hg\nLjzAcybHPrFwa4P68sQ+7sWtbulviiOGphp5GmMToTSIeUaJYIsGqMzW54ce\nwlbKweINTklJhA3ykxMriKvV7HUNlaZpdVxQx/ybBDAbfJ9XpL8bS7tTKTdp\n6nzTEy4XLZgYu4/j3lD0aGqIlJz9w4H6gLrkb+lCRjyQ9mSEG26O7w/IG8iB\nNEvemlCUJp0DqzAKpVeT9hPZGJT9HVMQbC6dWZ8Lhr1KScbGOfJDPMZEIkhp\nr2o8\r\n=A/AD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDMYcqbxomOJqKrozTF1EoHUw8BhSYCIim3fNzaFX6fRgIgIZDKy1tjiepR+V07fFKIpCp5nXkG7wU5xrm7qF7Y5K0="}]},"maintainers":[{"name":"adent","email":"martin.maly@gmail.com"}],"_npmUser":{"name":"adent","email":"martin.maly@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promises_1.0.1_1586529268873_0.45316245493987517"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-10T14:34:28.739Z","1.0.1":"2020-04-10T14:34:28.977Z","modified":"2022-04-04T11:28:46.569Z"},"maintainers":[{"name":"adent","email":"martin.maly@gmail.com"}],"description":"Promises package","homepage":"https://github.com/maly/es-promises#readme","keywords":["ES","JavaScript","Promises"],"repository":{"type":"git","url":"git+https://github.com/maly/es-promises.git"},"author":{"name":"Martin Maly"},"bugs":{"url":"https://github.com/maly/es-promises/issues"},"license":"MIT","readme":"# Usage\r\n\r\n```\r\nconst tasks = [\r\n  task1, task2, task3, ...\r\n];\r\n```\r\n\r\nAll of them have to be `fn(resolve,reject)`, i.e. \"promisable function\".\r\n\r\n# Methods\r\n\r\n## `promises.parallel(tasks)`\r\n\r\nRun all tasks together and returns promise, which is fullfilled in the moment the all tasks are resolved. Result is the array of all results\r\n\r\n## `promises.serial(tasks)`\r\n\r\nRun all tasks in the given order. Next task is invoked when previous is resolved. Returns promise, which is fullfilled in the moment the last tasks are resolved. Result is the array of all results\r\n\r\n## `promises.allSettled(tasks)`\r\n\r\nWait until all tasks have settled (each may resolve or reject). Returns a promise that resolves after all of the given tasks have either resolved or rejected, with an array of objects that each describe the outcome of each promise.\r\n\r\n## `promises.race(tasks)`\r\n\r\nWait until any of the task is resolved or rejected. If the returned task resolves, it is resolved with the value of the first task in the iterable that resolved. If it rejects, it is rejected with the reason from the first task that was rejected.\r\n","readmeFilename":"readme.md"}