{"_id":"@awhile/awhile","_rev":"8-134565af62c1f31d555ef406c887cfdd","name":"@awhile/awhile","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.0":{"name":"@awhile/awhile","version":"1.0.0","description":"Allows you to run  while loops concurrently and never block the main thread","main":"index.js","scripts":{"test":"mocha"},"keywords":["concurrency","promise","event","while","for"],"author":{"name":"Jeremy Gottfried"},"license":"ISC","devDependencies":{"chai":"^4.2.0","mocha":"^7.1.0"},"dependencies":{},"_id":"@awhile/awhile@1.0.0","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-a6y99arR78sAuGT4M8/z2Dl3buCKcJAFRHDmkqCCJ5kfVDsTiOw9WBJIS44RU5oP7IjhXuHNUaGnVMOSEeyIaw==","shasum":"f0e2ca9d4ba15c7bfe3ac8fda03949ae32ef7e8d","tarball":"https://registry.npmjs.org/@awhile/awhile/-/awhile-1.0.0.tgz","fileCount":3,"unpackedSize":3763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebmAoCRA9TVsSAnZWagAAl34QAIIQyambijXZJ4wgRtDm\nXU/4yho8QuX690/S6Ra0Zeeu3HI7H/q0UkSZoNIhspIL6bGzXHuQLbyQ7kKT\nIC2cFnlRK6XJ4t9Fil3XjyxNPFdea1A9CvptyU1b6+HyE9K6vFIa+PAo5Ksh\nw05xzKgM3qilA1d7MCKVotDAiVN4Xm7xtougy57ELLzq7KRMTaUvamE+JKZU\neK2L0xagmzmv+EnJAGvrRqKdNzJXQe8fNPyJggTVtXA9lS+xuelmLlumplXo\n0QyVDqsNNR2XMgIP1m9rQTASgPK+DpKobbK/X89JuOfHNBR6iZSUyCt7HQ8D\nXgjMHZRa7xJVIJ1mR6NpUaKtmb019XtPajnnybudaLTbaG95jzESakXf/sbL\nmaz3b+/w0YeFbbrUbP31rETBRy/qJRNovwwzxJGdwdgBQ2d1uLNFsfVLQl+z\ngbbUNVLgOoJnohLB6k/sW0Mr8yoaZw4qcBy6iyc6BMhWqYAVdZa3cGNIKjAg\nfw2bArWT9Hm7GrrD9nK0ibVkuq1Tt24N81tdpJxnbvAhcPZUZ/QXXlqpPId/\nnTV1CkBezCecjcoRzpjguzzlpikk68mDp/SRnXdspsU4QNcev8Hj8R/dsw44\nl4oJp1qUqObB1qu1XKNrpW4j0r6ofk40kvG8G6aG3r/oWG7W66hmk+6ThfZv\nOztr\r\n=uVFh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIofQPCFdcq3ud8kfVC7xV5KfH4jzd9QlAev0gjJrnQQIhAK72N0eVJy8L1J1c5WC23QFYoKwDEnfZcRPr648n2ZzP"}]},"maintainers":[{"name":"jeremyagottfried","email":"jeremyagottfried@gmail.com"}],"_npmUser":{"name":"jeremyagottfried","email":"jeremyagottfried@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/awhile_1.0.0_1584291880034_0.7837107438989266"},"_hasShrinkwrap":false},"1.0.1":{"name":"@awhile/awhile","version":"1.0.1","description":"Allows you to run  while loops concurrently and never block the main thread","main":"index.js","scripts":{"test":"mocha"},"keywords":["concurrency","promise","event","while","for"],"author":{"name":"Jeremy Gottfried"},"license":"ISC","devDependencies":{"chai":"^4.2.0","mocha":"^7.1.0"},"dependencies":{},"_id":"@awhile/awhile@1.0.1","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-B7DrYi6Xa85rN4epOvRn7P4Eh+rcADmTWtB4Ve1jtuVQ62QmJPVZF900pd6Qy2qIHPh/ZZp1m/n7X8eltK00XQ==","shasum":"c49bba31e416a5e371198c9b64287722e040dc66","tarball":"https://registry.npmjs.org/@awhile/awhile/-/awhile-1.0.1.tgz","fileCount":3,"unpackedSize":4019,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebmq/CRA9TVsSAnZWagAALdIP/3m+bU9vl8T42dXv8M+O\n/dyeq3xzeNrNb2NIab3MetNxoQZXb49qRa4Y4ywrMHeND+gBGgHOUGwwRfvY\nqIc3nsJsFUCnE3EHd8L+aYoQaPa5OOb7NDmekOA8MxgHClvMKNjx62vFb6HU\nonagEDwZUCFY4kJ6UeVgXxJ11jAKfJBKETfzLM4C8dCxdrK5H0uB5nkAUcTj\npVb79Cq3AvKj0kvgUYaC1oe4KJbCQXpKH8Ic67F9AIyrav57e8G/hmjMkh2D\nDwd7HRWIA1u8EMRt1noZ78DCMqtJoUqsnpHIc0S7BWlQt8YSIWCgPaQS2J+U\nxbBDKvJNR6ga2/umG/Ehr/bunhjiiX0ar/jJCARahYGfMiD68JfAAcXO9Ygt\neq7bDUexIvPfu2K+DLpjakSqzemUqQTETgZqu5aO4xMwkkWkehOhaR+ckEaL\njMcfNg9g2r+iVEKJY7HYoJDOQFZDC2CtByJhoH1HoktcLPnFlvhICwFyZiV+\nG6sfKhExTRczJtCSd5rPicY6Tt/HXQqqN5kG0djMJswbfyGiOO4zPoSrghQl\n68vAIFDtV6YTXoDysDHIXDnFkc4jVkv+7+rJBG2RtoBdiSreHyAtmj0tMa0Z\nED46POEewcNYW80EKL4EAGXX0SoIhnXXTLh2NwoSON1HDANiSe211Qx1pp2K\nuKfl\r\n=j4bk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEGsPTq7ocQm8O+bOd+uYSeBxwBfevfdzL0URD/xoH8DAiEAtUjNWw+l9hr910W17ewoMWrw6dcF72eLWaWIyKB9Gjc="}]},"maintainers":[{"name":"jeremyagottfried","email":"jeremyagottfried@gmail.com"}],"_npmUser":{"name":"jeremyagottfried","email":"jeremyagottfried@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/awhile_1.0.1_1584294591082_0.8791745114975902"},"_hasShrinkwrap":false},"1.0.2":{"name":"@awhile/awhile","version":"1.0.2","description":"Allows you to run  while loops concurrently and never block the main thread","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/jeremygottfried/awhile.git"},"scripts":{"test":"mocha"},"keywords":["concurrency","promise","event","while","for"],"author":{"name":"Jeremy Gottfried"},"license":"ISC","devDependencies":{"chai":"^4.2.0","mocha":"^7.1.0"},"dependencies":{},"gitHead":"a3fb624de91e0e40d4f42efd51fad64762c49124","bugs":{"url":"https://github.com/jeremygottfried/awhile/issues"},"homepage":"https://github.com/jeremygottfried/awhile#readme","_id":"@awhile/awhile@1.0.2","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-Q3GhG9b5vjYfGFRGyXFVYClwGW9c/XmRiCruQDHQoBt/g4zHASIytFgd/1LlGBm1ekBMeM+1IFomjmOq+obAMw==","shasum":"e66e51e6b78417cf62b6e547e84ae19593f9079b","tarball":"https://registry.npmjs.org/@awhile/awhile/-/awhile-1.0.2.tgz","fileCount":4,"unpackedSize":7660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebnsuCRA9TVsSAnZWagAAY4AP/3nlcbmk8AP6dQSatI2N\nIZmv+mW8eNvQ7jfN9YqiNJN3ZFkDnq8i1/zw8KW1+AtP/5ZRfXN3MS2GrySf\no0b57g2kaW8nZkLbYwlF3pf3sG96X4Ct+sFDjCd3uEqf+hI3CTtxw8egB7fy\nNDQvZJ+5wvcSh+cbc/1wBuiOaOAYaYrW6LQ5G0Rad5akh8kZVq+XqMd5HG2t\nyN7IOjCnU8B/W5GfkatXC/XmmDHUG5pHdrdKukK1qGqIL4F98DlKHCUlwdrT\nNPFDqrWfVEs4//4dDR7T4eUneUKbwO6zd0eTO/tFb8LJRbrwG0g9uWET8Ulg\nsBnuV/rVlgNfmyz15Pb54mRM0vRv8DCyUR/3vqpT9jFWdAUjAERY/Jh8ifAt\n/+PX5OwC9FvRM/Cqnb4XQbK34BL0Jed5Xd4O/QgcGmblepG8FAY81+oTDLIq\nzLbXYd4iN+ltL9VCSlt4qIFAO0OrybLxeHaE7omh3efKjEscL1ESQ8k1XCz5\nRShgWslvb8lzRwwCg3PoqgNoAOTkMdMOiR91XIPLw8G0tGpPNFKV1wuCHxqx\nn4dymVKM8ZQhd79701YZK8BBABQC861vF6wthS4hSVMoxPVY9j7hH9iKyfg9\nJKN9Jc8ZMSyXEKk4W4GRpLZdHODnX4znvT6dTj0B597oZ3PKWN2XQTliB/9D\n1VQi\r\n=r5EZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFu12yzpKxvvM7tpJjupKWxCPGyp02C+VMoeZdmzx2A9AiB+ixrFaAC9bzceM8i09tlzOa6xf/D5OeMcLEoPfAO97g=="}]},"maintainers":[{"name":"jeremyagottfried","email":"jeremyagottfried@gmail.com"}],"_npmUser":{"name":"jeremyagottfried","email":"jeremyagottfried@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/awhile_1.0.2_1584298797989_0.044191640074277005"},"_hasShrinkwrap":false},"1.0.3":{"name":"@awhile/awhile","version":"1.0.3","description":"Allows you to run  while loops concurrently and never block the main thread","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/jeremygottfried/awhile.git"},"scripts":{"test":"mocha"},"keywords":["concurrency","promise","event","while","for"],"author":{"name":"Jeremy Gottfried"},"license":"ISC","devDependencies":{"chai":"^4.2.0","mocha":"^7.1.0"},"dependencies":{},"gitHead":"9b96c83df9e62a06995f345f6a1c515786b621e7","bugs":{"url":"https://github.com/jeremygottfried/awhile/issues"},"homepage":"https://github.com/jeremygottfried/awhile#readme","_id":"@awhile/awhile@1.0.3","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-k/lcC6v/u4DNv8cXhL/g0t38UFfALAbkgkPluVbg5Cdi2hJ63r/mR2qqzGLIaZC51Q1b4bgORlMAylvpwON8/Q==","shasum":"36aba6f3ac8862ee2ddcdadce92c16475c414936","tarball":"https://registry.npmjs.org/@awhile/awhile/-/awhile-1.0.3.tgz","fileCount":4,"unpackedSize":8606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebn54CRA9TVsSAnZWagAAcoIQAJ44LEHU8YB/iLRfEgBo\n7tqS7yh2LvVI6wRdJfoaISkYp2qxiOtsKDIod7PDKimX0dRT0gMcAr6hN2ly\n/j71aiflYUq+DXZ1lOnZdZQlnreGIURsfpq+vLhi47Li90+sRVvTtYKWf0oB\nQe6Keav6tnOgDOoUfddtXW+Rw64gNnQ92FNAsk1BNDco1FLjLZVyZCj984yi\nZ8r1il4ekE/EZVTifhVi7/sxHDrYISZa/HmdyKL8c36QkcoAjupzABpNkqKZ\nz94k/DzccOSdzQW+1l04rId+NTuws9oasWUefdMRF5se2MRAm5beQuC7G/ar\nokbnUPXj011FxW2Mv+tRrk1DOq2nfOyTgQPOcYKHgOL00jkE7f666dmYG2vW\np6H9nI1yA+zPsOR0bd886FcCU64y1eV8z4EuVTRquzugo40yVQrf8vjU+xLI\nzi2X4/7XjxcD0KCfHnA1rAop5hf4X6kILS/T2Hzr6xn3eOoR6Tb7ZJm7M3fa\nLz9J3h3BD14IbRBdbkHb1B/GFDp0oImmK/107woGyR0kNaJkCr9UDi1XbGeg\nz8tLz3OPIDo6uqJyqOhvh9w/3G5qMfwjNFBGQwHzVTFk4Fa4GYhTELQhqVlu\nvlxv7FXR8T7bFFjbUENQJCuV7ElVLwEFUJOLf54t41TUFKq72M71b2wz1MJ4\nRuxs\r\n=Rxxq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB/mVPL4ithO2ls0VAxDjs9dDRrxVi3J5Qp0KX2DDCZlAiEArnbSBFd7Lsw7Lwp77g0fZdk9sO3xacXnW+x3HN6WujY="}]},"maintainers":[{"name":"jeremyagottfried","email":"jeremyagottfried@gmail.com"}],"_npmUser":{"name":"jeremyagottfried","email":"jeremyagottfried@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/awhile_1.0.3_1584299639504_0.4361277964292003"},"_hasShrinkwrap":false},"1.0.4":{"name":"@awhile/awhile","version":"1.0.4","description":"Allows you to run  while loops concurrently and never block the main thread","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/jeremygottfried/awhile.git"},"scripts":{"test":"mocha"},"keywords":["concurrency","promise","event","while","for"],"author":{"name":"Jeremy Gottfried"},"license":"ISC","devDependencies":{"chai":"^4.2.0","mocha":"^7.1.0"},"dependencies":{},"gitHead":"9b96c83df9e62a06995f345f6a1c515786b621e7","bugs":{"url":"https://github.com/jeremygottfried/awhile/issues"},"homepage":"https://github.com/jeremygottfried/awhile#readme","_id":"@awhile/awhile@1.0.4","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-JjTGvUiS0u5tim7fOrnfo4wuRvcf2szEpQ7YLh4m3kWMwcNPiXe35D+NexHhklo5MEFI1qeVCtHo92FJIdMyeg==","shasum":"236f09249214317a5032eaf58eb9a1f13ed7bff6","tarball":"https://registry.npmjs.org/@awhile/awhile/-/awhile-1.0.4.tgz","fileCount":4,"unpackedSize":8606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebn8LCRA9TVsSAnZWagAAxKgP/1gUOdgNEIDtU7fl3bXO\njz3Fgq3v1bLCWUCh5sQ/H+hs/AaGoa3DN3lGqxL+579829789dd0tZuVUrD5\nD6ZcNaSwLYlYNI09jqnZbXzoKGU+yPb1GdGOZ+qwTRZLoVr+gFSZhr8lU/c1\nRJHUBpXnowB72S0p5CPIwshqvOjH39BoVDcQZihXSqLk10H54zYz+JEfseR1\nTSR1RbMReKHmzLYR2aYcwD/cl2iP3hkplLulopU/uI6Af3ZTtFzvi3+jOQNR\ndoUwjIeaBPRTqmm7yJOmLP0P4NPrDo0U85FecWETKAYdYr0gBdlT3dh4ODEQ\nw2vBvAGVPoN36g2p0yye0oArWKgex1BB6NREvEObwqJH+Fb7u1ryIvG+1cIU\nWb5Kr57U4Z6S5r+h9BgXnwA5T+DTeIAg6ytx7hYA8T3LbmUtDp1wZbz8N1v/\n1yof7aeXeGzEKPqwCMeEZ72+doTpkTwdC2CDVN+i7gST2MlE+bjlTL/lY/6P\nEg42QG0nfWJV7czm0Lg77i+9ZhvxNk/IPUZT6DT2/zhU2j49TW2VyqGwxP57\nxftw6uhIl2oZ7B4Hk3N4Nz6xu59UwXwr/SEqzTXixGmBRU1RGxog4vsvNpIR\nzVWEFwqCxVWW4bVXAa0leBOBEOaqgq/iGUfeKBBhk71Q1+jtHb92dJwtFzmL\nxKSK\r\n=YCfw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDobKZ+yMw2xXkOqFUcC7SKMgHXnMWQA+roK3uo9u//XgIhANtzlcPto75Ue5RzZsV5YPGh1ORxNjl5beGpZpeYGBko"}]},"maintainers":[{"name":"jeremyagottfried","email":"jeremyagottfried@gmail.com"}],"_npmUser":{"name":"jeremyagottfried","email":"jeremyagottfried@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/awhile_1.0.4_1584299786804_0.9410963423368772"},"_hasShrinkwrap":false},"1.0.5":{"name":"@awhile/awhile","version":"1.0.5","description":"Allows you to run  while loops concurrently and never block the main thread","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/jeremygottfried/awhile.git"},"scripts":{"test":"mocha"},"keywords":["concurrency","promise","event","while","for"],"author":{"name":"Jeremy Gottfried"},"license":"ISC","devDependencies":{"chai":"^4.2.0","mocha":"^7.1.0","node-fetch":"^2.6.0"},"dependencies":{},"bugs":{"url":"https://github.com/jeremygottfried/awhile/issues"},"homepage":"https://github.com/jeremygottfried/awhile#readme","_id":"@awhile/awhile@1.0.5","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-bYe23hzAorXTZEZJyoYfgv6DFn9Xqc5f3L4QRJHnuF7GQA7ACMy/WqcfT2Q6fEnsAPd9yLRjo7KgAa05fRfA1A==","shasum":"5200e6644a2e1cfeb2d88fc105211fd93116aafa","tarball":"https://registry.npmjs.org/@awhile/awhile/-/awhile-1.0.5.tgz","fileCount":5,"unpackedSize":12791,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecaj9CRA9TVsSAnZWagAAEHUQAJxbfh+kVjMnMzjoC8Nt\nyqEU7kHbiKfwjnrdhoFjhCukOh5hFod464VHMwxGZQWRXsE+LAOdg96+2jnz\n5mIx6IJIn5boAUjgJfQ0+9dnicNFf6YvVtA9h2N9865+zQv4TrnkwhtMVnxv\nX0J+lT9FV4E1A41AnuQPjnwjr8grKFylmgiKwgmmhRnFprukyBhg1jDGnsRq\nD6oAxYLpm/l0FCf462EfMtZGuOSo4S/XbcRkwev/JXTeRZoMSxi9EBqfYpuC\n3qWvxJY/k2Za6hiDsovBu5mo40cALu18GIQUsm6P+k94KHCefE3K1O+gyrxz\n3bINnIGwsJh8ZeUTTLV2I7rW3qK1zLeCXcDjEl3dYeq2sXl651NY6dQl01t3\nU2BWxSgFK8AG1olQLdsp1wZEtTGFTHX1+TkZoyl0pn7fzc1GXSfNrDhsHQuY\npytux6mnFjnY6nEFC/OuipxoV+qI29bF3HTqmWCptYUtwj3lBQU/AHnOYOt5\nYfzbL8uNw/R/LfgkRaJKa7IWwQpRJ6HnwDGTG7d2GeqtJO6A07ZM8Sxj3Hzo\nvwGnkrt+vVSMs0qOEIytiil1igULrxW2qp0QUcmgfNzBqqah7EKin10uMbAd\nZtRFVlFrnvLv9Bon+BkAqjm8aM+/u74rVu/omjs/kFZcMAzRCj466WKIIfZ5\nHc0O\r\n=kIDM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF+dSBN56gWtTNHbatr5jE094UMog0C5VCgEoLWnaErsAiA2OJaNDrT4wBLRTxfAfnfDMYSMApZ2mAXYLaqLoVa11Q=="}]},"maintainers":[{"name":"jeremyagottfried","email":"jeremyagottfried@gmail.com"}],"_npmUser":{"name":"jeremyagottfried","email":"jeremyagottfried@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/awhile_1.0.5_1584507133171_0.34808023371577157"},"_hasShrinkwrap":false},"1.1.0":{"name":"@awhile/awhile","version":"1.1.0","description":"Allows you to run  while loops concurrently and never block the main thread","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/jeremygottfried/awhile.git"},"scripts":{"test":"mocha"},"keywords":["concurrency","promise","event","while","for"],"author":{"name":"Jeremy Gottfried"},"license":"ISC","devDependencies":{"chai":"^4.2.0","mocha":"^7.1.0","node-fetch":"^2.6.0"},"dependencies":{},"bugs":{"url":"https://github.com/jeremygottfried/awhile/issues"},"homepage":"https://github.com/jeremygottfried/awhile#readme","_id":"@awhile/awhile@1.1.0","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-Z+SgoinIYage8DVxyrNYqwi+9hQ9VSd/XIf3QrgexOa1j2SFaVjsjYhLQ9E8v6coiC78XUsxmUNoMh2nN3RhGA==","shasum":"3a909cbeb6d07d23e472f6546b35fc3e5c02c4b1","tarball":"https://registry.npmjs.org/@awhile/awhile/-/awhile-1.1.0.tgz","fileCount":5,"unpackedSize":12791,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecanMCRA9TVsSAnZWagAAP4cQAI7iTaTCd0qsaytI8xIf\nteUp5eMS/kNJmKrnVmdV7tip2JrYGaXzPctntJGVBQJUiY+3aOQV5igp7Y4/\nlBWeDbngh/hvhhdxrw58I7+/deTk+7vGfkzshzYYFBrmWvU/vg5fZ+6OfX0f\nipNuPGDQAax2b7Y75YkOdr0miwXIPl60PImoDKsWB+PPU8oCk1t+v0ngaFCl\nF/sqUmLnV43vOWFX+ed/wrNHfv/SJSob2TLIfo6rhlkgvDqzt9gI34NS8H5i\nfmW9Fn2fg1mIHex49GW2Qn0/ZB/HWYkZWK1BO+Rje2tmK1xNqTs7L4pv1K4k\n6n4x71/CYUNvsSDm9S9o7Yt5LsjZKYZ2QnO7kAH4LJCsXG8stQkbjyHyoD3C\nStlGbtGPmAaSqUxUYvm8B8OP9eUvLclaDEW6jRX5La9EVuWBRsP2tsvYISF3\npY7DAEaQzUZYoYoTKb+YABfC6g3/bYLS3vkK7FR6p+yiGijxvhas0BrcHTla\nfQYLjH6bMB2upZsoUVkCTmvolT61qaRmkkrd+QSCuzAGdUWZLN/tksnjwnJR\nbLNQdA/kst/pOKVWJYGZ3GIQHWoPAdILVEc5OyN7qN2V+uhdfy2P1SnGLL36\n9iYXeUhOKYyRxIMfxAlyXHXNePHaEuLe1UELSa59zoFJP3BBOhDMRXBUKLm7\nbAPU\r\n=jy58\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6lGcZh0J/NV4Gfa7fjVTTiMws12fVglOf7+f10hEdngIhAJuSeqzCoKjyBBalN35Igl5OU0XAXEaPK9ji271x4+4l"}]},"maintainers":[{"name":"jeremyagottfried","email":"jeremyagottfried@gmail.com"}],"_npmUser":{"name":"jeremyagottfried","email":"jeremyagottfried@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/awhile_1.1.0_1584507339710_0.00990746384399066"},"_hasShrinkwrap":false},"1.1.1":{"name":"@awhile/awhile","version":"1.1.1","description":"Allows you to run  while loops concurrently and never block the main thread","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/jeremygottfried/awhile.git"},"scripts":{"test":"mocha"},"keywords":["concurrency","promise","event","while","for"],"author":{"name":"Jeremy Gottfried"},"license":"ISC","devDependencies":{"chai":"^4.2.0","mocha":"^7.1.0","node-fetch":"^2.6.0"},"dependencies":{},"bugs":{"url":"https://github.com/jeremygottfried/awhile/issues"},"homepage":"https://github.com/jeremygottfried/awhile#readme","_id":"@awhile/awhile@1.1.1","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-YWOMgI5UXFUjppWu18aFrjXSPlTBZUZ0fvPvhZTOQqbpgeHZUXDY3coAzqHefuW1f2tbMFSedww9sF5uiYaTkw==","shasum":"2b1c2a403cdece9e586834724b004b996b773867","tarball":"https://registry.npmjs.org/@awhile/awhile/-/awhile-1.1.1.tgz","fileCount":5,"unpackedSize":12691,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecmjuCRA9TVsSAnZWagAA61kQAJcXaiOnuJlq8B+xztLf\n1vDKZTawMhLvRhAQ0v/FxHn1se+KY21gdZJ/YCy1zXooep6D8qQbd9JiBdAa\n+b+YTzIHQ+l2njPYiv3XzDVcS+/DnWcDoyG4Frp1jMfg/GvMLotvHjUKCR3n\nuxjfjgoUZ229wwkt/j2Me+mMjBPomCajZGcRkgiAdA9Po+50ZUI+BhK8E7CS\n0wTRh93Dl5MRokEzjSvMRfmxbLyQUAQuCflQbSagg5Nxdve4HT5wU23lGpKE\nvfzJ3T2LgZhCEYY4sOABY6n9v6sQQalA443DGBsHoh7M/gggOP4aUPxtXn8V\npL3izBIgkpTe5DKhFnDybw3NvyQu9nh1SeCN9zPei4yCsY2qJ+1KKIbwP+WA\nvQgfdj/Y84KQZvF5QRGJyqThPB5F3MJ1+eVXfB9E78BvMgdAKfdiSaAFeRvF\ngxEFrknPAk6+M6Wk06JQgcxx8UIIbucd5ku5toDY9V/31YXKhtnkn2JK5uuh\nyUTeOjbixvrRNw/GgDPN6E7wCvGCa8f1IL7qbbaG02EY0fO7C9e/8ka3zdw8\nXDft4Pm4Shrht59R7VknQx4pdeA6uIQd2zm+cnOgw3Cj1pA1GiKVMgytjFYg\nxR0wVpK9J2nG8FmxiUvf5c9qbQPSxeLJS0uOr0Q7IxiKbQeR197GyqvGFd8C\nR1MA\r\n=kFwQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID2jTZ0JKeY2ubEpZ9kyBdrd9UrOEQzyIEwthg8FY72WAiA1MedRHwNAjCPIv6OO9FA4tVBGDjCT3igSCDGRAOvs3w=="}]},"maintainers":[{"name":"jeremyagottfried","email":"jeremyagottfried@gmail.com"}],"_npmUser":{"name":"jeremyagottfried","email":"jeremyagottfried@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/awhile_1.1.1_1584556270414_0.3181325225629017"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-15T17:04:39.791Z","1.0.0":"2020-03-15T17:04:40.164Z","modified":"2022-04-04T16:51:14.294Z","1.0.1":"2020-03-15T17:49:51.193Z","1.0.2":"2020-03-15T18:59:58.095Z","1.0.3":"2020-03-15T19:13:59.612Z","1.0.4":"2020-03-15T19:16:26.892Z","1.0.5":"2020-03-18T04:52:13.381Z","1.1.0":"2020-03-18T04:55:39.890Z","1.1.1":"2020-03-18T18:31:10.533Z"},"maintainers":[{"name":"jeremyagottfried","email":"jeremyagottfried@gmail.com"}],"description":"Allows you to run  while loops concurrently and never block the main thread","keywords":["concurrency","promise","event","while","for"],"author":{"name":"Jeremy Gottfried"},"license":"ISC","readme":"# awhile\n[![npm version](https://img.shields.io/npm/v/@awhile/awhile.svg)](https://www.npmjs.org/package/@awhile/awhile)    \n\nawhile is a js library for running while loops that don't block the main thread.\n\nUnlike `setInterval`, `awhile` resolves promises in order. If a task is asynchronous, the next task won't begin until the previous task resolves. In this way, you can use awhile like a virtual stack, and you can even use it to create a queuing system for task priority. `awhile` behaves similarly to a promise chain, except microtasks will be broken up task by task so that they don't block the queue.\n\nUnlike a normal `while` loop, `awhile` can run infinitely without blocking the main thread.\n\nEg. Both of these loops will run without blocking each other:\n```js\nloop1.begin();\nloop2.begin();\n```\n\n## Installation\n\n```sh\nnpm install @awhile/awhile\n```\n\nor\n\n```sh\nyarn add @awhile/awhile\n```\n\n## Usage\n\nHere is a simple counting loop;\n```js\nconst awhile = require('@awhile/awhile')\n\nlet count = 0;\n\nfunction condition() {\n  return count < 5;\n}\n\nfunction callback() {\n  count += 1;\n}\n\nconst loop = new awhile(condition, callback);\nloop.begin();\n```\n\nNote that a condition must be passed to `awhile` as a function, or as `true`.\n```js\nlet count = 0;\n\nfunction condition() {\n  return count < 5;\n}\n```\n\nawhile comes with a `break` function that can be called inside the callback or outside. `break` is a reserved word, so use an underscore like `_break` or another word like `stop` or `end`.\n\nHere is a loop that will break after 5 seconds:\n```js\nshouldStop = false;\nsetTimeout(() => shouldStop = true, 5000);\n\nfunction callback(_break) {\n  if (shouldStop) return _break();\n\n  doWork();\n}\n```\n\nYou can also call break outside the loop:\n```js\nconst loop = new awhile(condition, callback);\nloop.begin();\nloop.break(); // will stop after the current task;\n```\n\nIf you want the browser to use its default batching mechanism for promises, you can pass `true` to the `begin` function.\nThis option will improve performance in some cases. It will behave slightly differently, because now some groups of promises will be batched.\n```js\nconst loop = new awhile(condition, callback);\n\nloop.begin(true)\n```\n\nThe case where this option will cause issues is if you run an infinite loop, but your callback is not actually doing any async behavior. This example will block the main thread indefinitely:\n```js\nasync function callback() {\n  return \"bar\"\n}\n\nnew awhile(true, callback).begin(true);\n```\n\n`awhile` can also be treated as one big promise.\n\nIn this case, `done` will not be logged until the entire loop is complete;\n```js\nfunction callback() {\n  return somePromise;\n}\n\n(async function() {\n  const loop = new awhile(condition, callback);\n\n  await loop.begin();\n\n  console.log('done')\n})()\n```\n\nThe real power of awhile is that it allows you to run multiple infinite loops at the same time.\n\nIn the example below, these loops will both run infinitely without blocking each other.\n```js\n\nconst loop1 = new awhile(true, callback);\nconst loop2 = new awhile(true, callback);\n\nloop1.begin();\nloop2.begin();\n```\n\nawhile is also great for building custom versions of common browser APIs.\nHere is a full example where I use `awhile` to build `setInterval`:\n\n```js\nvar awhile = require(\"@awhile/awhile\")\n\nfunction setInterval(callback, time) {\n\n  const timer = () => new Promise(resolve => {\n    setTimeout(() => {\n      resolve();\n      callback();\n    }, time);\n  })\n\n  const loop = new awhile(true, timer);\n  loop.begin();\n  return loop;\n}\n\nfunction clearInterval(loop) {\n  loop.break();\n}\n\nfunction callback() {\n  console.log('bro')\n}\n\nconst interval = setInterval(callback, 1000);\nsetTimeout(() => clearInterval(interval), 10000)\n```\n\n## Under the hood\n\nBy default, `awhile` treats each callback as its own batch (chain) of microtasks. This differs from a for loop, which sometimes groups all `await` statements into a single batch (chain) of microtasks.\n\nFor example:\n\nUsing awhile:\n```js\n\ncallback() {\n  promise1().\n  then(promise2)\n  .then(promise3)\n}\n\nnew awhile(condition, callback).begin();\n```\nEach time awhile calls the callback, it creates a new microtask batch instead of grouping all callbacks into a single promise chain.\n\nA native JS `while` loop sometimes groups them.\nThese callbacks may be grouped into a single promise chain, potentially blocking the queue until all microtasks are complete.\n```\nwhile(condition) {\n await callback();\n}\n```\n\n## Caveats\n`awhile` comes in handy when you want tasks to function like a background thread. For example, if you have an array of pending tasks that is frequently updated. If you want to automatically carry out those tasks in order, awhile is a great tool.\n\n`awhile` can be used like a normal awhile loop, **but it will be considerably slower** for basic tasks like synchronously iterating through an array. For most looping tasks, the native while loop is better.\n\nBefore using awhile, consider using a built-in javascript API to handle async tasks in order.\n\nA `for` loop can be used inside an async function to create a promise chain.\n\n```js\nasync function chainWork() {\n  let workArray = [work1, work2, work3, work4]\n\n  for (const work of workArray) {\n    await work();\n  }\n}\n```\n\nUnder the hood, this resolves to\n```\nwork1()\n.then(work2)\n.then(work3)\n.then(work4)\n```\n\nConsider using `setInterval` for a synchronous task that needs to be looped continuously.\n```js\nsetInterval(task, 10)\n```\n\n## Background\n\nES6 Javascript introduced the promise and async/await paradigms.\n\nPromise is an API for interacting with asynchronous tasks.\nPromises wrap an asynchronous task in a helpful interface that handles resolution and rejection.\n\nThe `then` property gives you a callback that is executed when the async task is complete.\n\nExample\n```js\npromise.then((json) => {\n  console.log(json)\n})\n```\n\nPromises also introduced the concept of micro and macro tasks.\nMicro-tasks are given precedence in the queue, because they are often time sensitive.\nPromise callbacks are treated as micro tasks. A chain of promises may be batched together, all occurring before the next macro task.\n\nFor example:\n```js\nPromise.resolve()\n.then(work1)\n.then(work2)\n.then(work3)\n```\n\n`awhile` takes advantage of the promise interface to create task loops that don't block the main thread.\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\nISC(https://opensource.org/licenses/ISC)\n","readmeFilename":"README.md","homepage":"https://github.com/jeremygottfried/awhile#readme","repository":{"type":"git","url":"git+ssh://git@github.com/jeremygottfried/awhile.git"},"bugs":{"url":"https://github.com/jeremygottfried/awhile/issues"}}