{"_id":"looper","_rev":"10-441cf60e0d338ce37f919db4e91e4a51","name":"looper","description":"async loops that never RangeError","dist-tags":{"latest":"4.0.0"},"versions":{"1.0.0":{"name":"looper","description":"async loops that never RangeError","version":"1.0.0","homepage":"https://github.com/dominictarr/looper","repository":{"type":"git","url":"git://github.com/dominictarr/looper.git"},"dependencies":{},"devDependencies":{"tape":"1.0.4"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"bugs":{"url":"https://github.com/dominictarr/looper/issues"},"_id":"looper@1.0.0","dist":{"shasum":"9a7dcaa30a4bd759e53a1f084415c1c3c8cb45d9","tarball":"https://registry.npmjs.org/looper/-/looper-1.0.0.tgz","integrity":"sha512-xipePsbRzTI6IdNRDXlDJrdYwIyLy9FQ1RhemnUKWSTAfiWWhR62VPdfvY6O8VRqv1cIe6yheLU+O9es1eW1Ww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeeoRGMsk5ad0LKgotUJ3D8KxwV1Bb0C+I52Wcmr7vPwIhAJz/L0bEp1/OYTbUNmhdvc09ZjM+HY3LwCKpbcDvgjxB"}]},"_from":".","_npmVersion":"1.3.0","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}]},"2.0.0":{"name":"looper","description":"async loops that never RangeError","version":"2.0.0","homepage":"https://github.com/dominictarr/looper","repository":{"type":"git","url":"git://github.com/dominictarr/looper.git"},"dependencies":{},"devDependencies":{"tape":"1.0.4"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"bugs":{"url":"https://github.com/dominictarr/looper/issues"},"_id":"looper@2.0.0","dist":{"shasum":"66cd0c774af3d4fedac53794f742db56da8f09ec","tarball":"https://registry.npmjs.org/looper/-/looper-2.0.0.tgz","integrity":"sha512-6DzMHJcjbQX/UPHc1rRCBfKlLwDkvuGZ715cIR36wSdYqWXFT35uLXq5P/2orl3tz+t+VOVPxw4yPinQlUDGDQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDITdhOHEigTaFG5a0qtEAKq3aZjhIauF/Q9aMdfll0gwIgMUNQLZ8QPnzKq+VXR5TmgXD6kRY4h0/JAZ0hRP+b0EY="}]},"_from":".","_npmVersion":"1.3.0","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}]},"3.0.0":{"name":"looper","description":"async loops that never RangeError","version":"3.0.0","homepage":"https://github.com/dominictarr/looper","repository":{"type":"git","url":"git://github.com/dominictarr/looper.git"},"dependencies":{},"devDependencies":{"tape":"1.0.4"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"bugs":{"url":"https://github.com/dominictarr/looper/issues"},"_id":"looper@3.0.0","_shasum":"2efa54c3b1cbaba9b94aee2e5914b0be57fbb749","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"dist":{"shasum":"2efa54c3b1cbaba9b94aee2e5914b0be57fbb749","tarball":"https://registry.npmjs.org/looper/-/looper-3.0.0.tgz","integrity":"sha512-LJ9wplN/uSn72oJRsXTx+snxPet5c8XiZmOKCm906NVYu+ag6SB6vUcnJcWxgnl2NfbIyeobAn7Bwv6xRj2XJg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBNU5IqmfrHJqQOTM6LrkYmK83jlutcKVG8RXn0t4R9nAiAsq7STQZ04bnqrQlYQn0s7SgO423/q3OqhKMQzvaxPrg=="}]}},"4.0.0":{"name":"looper","description":"async loops that never RangeError","version":"4.0.0","homepage":"https://github.com/dominictarr/looper","repository":{"type":"git","url":"git://github.com/dominictarr/looper.git"},"dependencies":{},"devDependencies":{"tape":"1.0.4"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"gitHead":"8a2fda78168d0891e541c9e3618a087d48958c29","bugs":{"url":"https://github.com/dominictarr/looper/issues"},"_id":"looper@4.0.0","_shasum":"7706aded59a99edca06e6b54bb86c8ec19c95155","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"dist":{"shasum":"7706aded59a99edca06e6b54bb86c8ec19c95155","tarball":"https://registry.npmjs.org/looper/-/looper-4.0.0.tgz","integrity":"sha512-NjGRcX4vCwyfbujv03omakGfAYh6St5kVsZFKfU23MFO1Z9/mZT8ypTZMEnvVC7nJeYtbqkRPFV4GoJBPdJgYw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUQE3v73qq7wXhD3NMzj3rRIlJ6ObLgY6vXQYmbS4CagIhAKhmxRyjHfF/UacGrGXbCVAtkUwiSursmq5Hb5LnEOGN"}]},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/looper-4.0.0.tgz_1492279133263_0.5168007875327021"}}},"readme":"# looper\n\nLoop with callbacks but don't RangeError\n\n[![travis](https://travis-ci.org/dominictarr/looper.png?branch=master)\n](https://travis-ci.org/dominictarr/looper)\n\n[![testling](http://ci.testling.com/dominictarr/looper.png)\n](http://ci.testling.com/dominictarr/looper)\n\n## Synopsis\n\nNormally, if `mightBeAsync` calls it's cb immediately\nthis would `RangeError`:\n\n``` js\nvar l = 100000\n;(function next () {\n  if(--l) mightBeAsync(next)\n})\n```\n\n`looper` detects that case, and falls back to a `while` loop,\nin computer science something like this is called a [trampoline](https://en.wikipedia.org/wiki/Trampoline_(computing))\nthis module is simpler than other trampoline libraries such as [tail-call](https://github.com/Gozala/js-tail-call)\nbecause it does not preserve arguments. But this is still useful\nfor looping when  async recursion is sometimes sync.\n\nThis is about 10 times faster than using [setImmediate](http://devdocs.io/node~6_lts/timers#timers_setimmediate_callback_args)\n\n## Example\n\n``` js\nvar looper = require('looper')\n\nvar l = 100000\nvar next = looper(function () {\n  if(--l) probablySync(next)\n})\n\nnext()\n```\n\nwhen you want to stop looping, don't call `next`.\n`looper` checks if each callback is sync or not,\nso you can even mix sync and async calls!\n\n## License\n\nMIT\n\n","maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"time":{"modified":"2022-06-19T14:17:45.230Z","created":"2013-07-09T04:08:14.157Z","1.0.0":"2013-07-09T04:08:15.318Z","2.0.0":"2013-07-09T05:51:05.313Z","3.0.0":"2014-08-19T00:13:17.848Z","4.0.0":"2017-04-15T17:58:54.953Z"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"repository":{"type":"git","url":"git://github.com/dominictarr/looper.git"},"homepage":"https://github.com/dominictarr/looper","bugs":{"url":"https://github.com/dominictarr/looper/issues"},"license":"MIT","readmeFilename":"README.md"}