{"_id":"hurryup","_rev":"23-137ad2bdd8ca6ac9ecebe857b71a5a7a","name":"hurryup","description":"hurryUp.js ==========","dist-tags":{"latest":"0.0.8"},"versions":{"0.0.0":{"name":"hurryup","version":"0.0.0","description":"hurryUp.js ==========","main":"./lib/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/crcn/hurryUp.js.git"},"author":"","license":"BSD","dependencies":{"comerr":"0.0.x"},"_id":"hurryup@0.0.0","dist":{"shasum":"b67f0eecf660b7bb6044eeb5fc39adea86f29581","tarball":"https://registry.npmjs.org/hurryup/-/hurryup-0.0.0.tgz","integrity":"sha512-+F9FimfinlA+1JxPYiqH23LtLVLwrnX6lNGxq2vh2ZZhJpkx1mBtN5RlHB3lOaIZB0QJVvpzcpFcuUQa2egC/w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCR4gPDJMCUKG1F4QLQy7263bQSpB8TM2excGLwxqouigIgNaXoAfdmdozhUCA/t/PKlezV+kn+nSJVQAIrc+GhFcM="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"architectd","email":"craig.j.condon@gmail.com"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"}],"directories":{}},"0.0.1":{"name":"hurryup","version":"0.0.1","description":"hurryUp.js ==========","main":"./lib/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/crcn/hurryUp.js.git"},"author":"","license":"BSD","dependencies":{"comerr":"0.0.x"},"_id":"hurryup@0.0.1","dist":{"shasum":"f920a58e02352036ecb029f9eb6a5db7ccd0e360","tarball":"https://registry.npmjs.org/hurryup/-/hurryup-0.0.1.tgz","integrity":"sha512-jQMi1PYYYmXVHLKwu2dVZp5mvDpJLRZ5+VdfuAXfyuxMiVEKJ5+rWUb2S1NbqeFWDye43dOslX+kz7AokmfFvA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFOVwMj9xWD596x5Sb/Cq3l9/JG9PQ/8VJj5J6GcNWMYAiAk8WNmv/XJNrR6rbU/Vfkp2GewS1imCm36xKTHl9H30A=="}]},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"architectd","email":"craig.j.condon@gmail.com"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"}],"directories":{}},"0.0.2":{"name":"hurryup","version":"0.0.2","description":"hurryUp.js ==========","main":"./lib/index.js","scripts":{"test":"mocha --reporter min"},"repository":{"type":"git","url":"git://github.com/crcn/hurryUp.js.git"},"author":"","license":"BSD","dependencies":{"comerr":"0.0.x"},"devDependencies":{"expect.js":"0.2.x","mocha":"1.8.x"},"_id":"hurryup@0.0.2","dist":{"shasum":"2862cdc01152f5dcca743f37735d300bd6efa41c","tarball":"https://registry.npmjs.org/hurryup/-/hurryup-0.0.2.tgz","integrity":"sha512-iaWvXiuWH4z/uhWL1GTGRKwLG7wVpJvfbEsGU3GdEdRBaXlv9s6SUmUTi4H+HHXCw8l261NYPNJuKLhAhKpN3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwaYJfQV2vVZEc8PdbTYmyUolkvZJOrf/OSECt+ZZIPgIgCTgIkffHGmgll6MXR8ZMMtBVYfFZzFTO0qabF3zDHMo="}]},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"architectd","email":"craig.j.condon@gmail.com"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"}]},"0.0.4":{"name":"hurryup","version":"0.0.4","description":"hurryUp.js ==========","main":"./lib/index.js","scripts":{"test":"mocha --reporter min"},"repository":{"type":"git","url":"git://github.com/crcn/hurryUp.js.git"},"author":"","license":"BSD","dependencies":{"comerr":"0.0.x"},"devDependencies":{"expect.js":"0.2.x","mocha":"1.8.x"},"bugs":{"url":"https://github.com/crcn/hurryUp.js/issues"},"homepage":"https://github.com/crcn/hurryUp.js","_id":"hurryup@0.0.4","dist":{"shasum":"f33e9402e0a7986803d93f42170c945813026d19","tarball":"https://registry.npmjs.org/hurryup/-/hurryup-0.0.4.tgz","integrity":"sha512-HcHijzFOxjldgKryNaWXjEsNq59M/oBMi6vGzD9FwFW1bDBtRiW0en1Hz438hmkSluZsPF09g9UvYmiIkAdTYQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDpraR5gwFXYxVo4YwDWd43QNh1BHhmIMBUSoveLv8j9AiBiK4lxG7EMpU+qhtN5DRWkxA1s8r699BBl5dN8V7sFlg=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"architectd","email":"craig.j.condon@gmail.com"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"}]},"0.0.5":{"name":"hurryup","version":"0.0.5","description":"hurryUp.js ==========","main":"./lib/index.js","scripts":{"test":"mocha --reporter min"},"repository":{"type":"git","url":"git://github.com/crcn/hurryUp.js.git"},"author":"","license":"BSD","dependencies":{"comerr":"0.0.x"},"devDependencies":{"expect.js":"0.2.x","mocha":"1.8.x"},"bugs":{"url":"https://github.com/crcn/hurryUp.js/issues"},"homepage":"https://github.com/crcn/hurryUp.js","_id":"hurryup@0.0.5","dist":{"shasum":"12bef6ef0774df7f324b807764571b360393871b","tarball":"https://registry.npmjs.org/hurryup/-/hurryup-0.0.5.tgz","integrity":"sha512-q9WU4hTtBAYrmhPkjyOfuXyKWQ7m0CiQjoBCOhyZaNUGlhL1zCkLvXo5Y7Fhi1j0lGpPhd0QZL/YlMQGgcxerA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0/f2frrxHGfasH31RpBrtEls8JptAMwM7tMVYH7lTCAIhAKS5Kk09ftfqIY7bfHikXtMCsqP5hWATbgM2tns/lv/a"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"architectd","email":"craig.j.condon@gmail.com"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"}]},"0.0.6":{"name":"hurryup","version":"0.0.6","description":"hurryUp.js ==========","main":"./lib/index.js","scripts":{"test":"mocha --ui tdd --reporter dot"},"repository":{"type":"git","url":"git://github.com/crcn/hurryUp.js.git"},"testling":{"files":["./node_modules/es5-shim/es5-shim.js","./node_modules/es5-shim/es5-sham.js","test/*-test.js"],"harness":"mocha-tdd","browsers":["ie/7..latest","firefox/3.5","firefox/latest","chrome/latest","safari/latest","opera/latest"]},"author":"","license":"BSD","dependencies":{"comerr":"0.0.x"},"devDependencies":{"expect.js":"0.2.x","mocha":"1.8.x","es5-shim":"3.4.0","testling":"1.7.0"},"gitHead":"d83b92478f8d59cf0cfaa437630ce344e996a987","bugs":{"url":"https://github.com/crcn/hurryUp.js/issues"},"homepage":"https://github.com/crcn/hurryUp.js","_id":"hurryup@0.0.6","_shasum":"878fa49661dad043de72d67235a85e6c6b500284","_from":".","_npmVersion":"1.4.24","_npmUser":{"name":"architectd","email":"craig.j.condon@gmail.com"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"}],"dist":{"shasum":"878fa49661dad043de72d67235a85e6c6b500284","tarball":"https://registry.npmjs.org/hurryup/-/hurryup-0.0.6.tgz","integrity":"sha512-Jd2BP5yJTG9gbf/gXLhBICoUKxmYjktvByKibHVYaIUrFwdhvOfhs6XlJ10ikzu2r5SzxLTu6q/F6Fc9CGCCOA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCy2sZxtXOH40s+ahcgZTzp0VcYztPGFQf3a1l/ehRHuAIhAPTNushBcfBXJfahuNOg6UltgPU69ODsW3I/Evgth2GX"}]}},"0.0.7":{"name":"hurryup","version":"0.0.7","description":"hurryUp.js ==========","main":"./lib/index.js","scripts":{"test":"mocha --ui tdd --reporter dot"},"repository":{"type":"git","url":"git://github.com/crcn/hurryUp.js.git"},"testling":{"files":["./node_modules/es5-shim/es5-shim.js","./node_modules/es5-shim/es5-sham.js","test/*-test.js"],"harness":"mocha-tdd","browsers":["ie/7..latest","firefox/3.5","firefox/latest","chrome/latest","safari/latest","opera/latest"]},"author":"","license":"BSD","dependencies":{"comerr":"0.0.x"},"devDependencies":{"expect.js":"0.2.x","mocha":"1.8.x","es5-shim":"3.4.0","testling":"1.7.0"},"gitHead":"f0d993dbd3d711f4d41d78ce827a285d183c1148","bugs":{"url":"https://github.com/crcn/hurryUp.js/issues"},"homepage":"https://github.com/crcn/hurryUp.js","_id":"hurryup@0.0.7","_shasum":"99af0d5fbdbbb352d9c6e361a1f9a1b1cf12870d","_from":".","_npmVersion":"1.4.24","_npmUser":{"name":"architectd","email":"craig.j.condon@gmail.com"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"}],"dist":{"shasum":"99af0d5fbdbbb352d9c6e361a1f9a1b1cf12870d","tarball":"https://registry.npmjs.org/hurryup/-/hurryup-0.0.7.tgz","integrity":"sha512-KTyP/d1OQjQ84SIxogx4XP2capJuYkbnegmbyl+LwT2DQRMHOoT8sHDEy1vnbvhyAft7tS7/98aEfEP5E6mVSw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvmvFPiLZS5Cu5eujK70nCnnaW+16T62LiZT4JmGT7NwIhAO51soAFU7MsS3EaPUQ2a6nD20Cv34crrQmcCg/uXbrP"}]}},"0.0.8":{"name":"hurryup","version":"0.0.8","description":"hurryUp.js ==========","main":"./lib/index.js","scripts":{"test":"mocha --ui tdd --reporter dot"},"repository":{"type":"git","url":"git://github.com/crcn/hurryUp.js.git"},"testling":{"files":["./node_modules/es5-shim/es5-shim.js","./node_modules/es5-shim/es5-sham.js","test/*-test.js"],"harness":"mocha-tdd","browsers":["ie/7..latest","firefox/3.5","firefox/latest","chrome/latest","safari/latest","opera/latest"]},"author":"","license":"BSD","dependencies":{"comerr":"0.0.x"},"devDependencies":{"expect.js":"0.2.x","mocha":"1.8.x","es5-shim":"3.4.0","testling":"1.7.0"},"gitHead":"12d480438f67ec89bfd2ba71730629c0ab1d5c8a","bugs":{"url":"https://github.com/crcn/hurryUp.js/issues"},"homepage":"https://github.com/crcn/hurryUp.js","_id":"hurryup@0.0.8","_shasum":"fcd742f33fcebd24fc3ca93a445027e8a6642f5b","_from":".","_npmVersion":"2.5.0","_nodeVersion":"0.10.4","_npmUser":{"name":"architectd","email":"craig.j.condon@gmail.com"},"maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"}],"dist":{"shasum":"fcd742f33fcebd24fc3ca93a445027e8a6642f5b","tarball":"https://registry.npmjs.org/hurryup/-/hurryup-0.0.8.tgz","integrity":"sha512-J/1AWCFYPym1dY5hdOsCN+73vxoiO4m/xmHg0c3wO69ZMDBZA8cwuNiT5Sk4bqTN9060O33P7V1Aqf+RxXaJmA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCo3rvvKIvHoow7q+ejJt3/0WG3ttYc9Hu4Q8C2g6INxgIhAP5mQGh1QxzKh2OnOvOIyeHnmAJsIT/Rl4NBu1SoYH0t"}]}}},"readme":"[![Build Status](https://travis-ci.org/crcn/hurryUp.js.svg)](https://travis-ci.org/crcn/hurryUp.js)\n\nHurryUp is a timeout library for asynchronous, fault-prone function calls. Basically, it'll timeout an async call if it's been running for too long. You can also specify to re-call async functions until they succeed (see below).\n\nWhat can you use it for?\n\n- db operations\n- api calls\n- async jobs\n\n\n#### hurryUp(asyncCallback, optionsOrTimeout, ...args)\n\n- `asyncCallback` - async function to call\n- `optionsOrTimeout` \n  - `object` - options passed\n    - `retry` - TRUE if the timedCallback should be re-called if it returns an error\n    - `retryTimeout` - timeout between retrying timed callback\n    - `timeout` - kill timeout\n  - `number` - the timeout before killing the function call\n- `...args` - additional arguments to pass to the async callback\n\n```javascript\nhurryUp(function(next) {\n  \n  //this will cause an error\n  setTimeout(next, 2000);\n}, 1000).call(null, function(err, result) {\n  console.error(\"timeout has occurred!\")\n})\n```\n\nHere's an easier way to wrap around a method:\n\n```javascript\nhurryUp(emitter.once, 1000).call(emitter, \"connected\", function(err, result) {\n  \n});\n```\n\nYou can also use hurryup to run a callback multiple times until it succeeds, like so:\n\n```javascript\n\nfunction isItReady(next) {\n  //async stuff here\n  next(new Error(\"no!\"));\n}\n\nhurryUp(function(next) {\n  isItReady(next);\n}, { retry: true }).call(null, function(err) {\n  console.log(err.message); //no!\n});\n```\n","maintainers":[{"name":"architectd","email":"craig.j.condon@gmail.com"},{"name":"crcn","email":"craig.j.condon@gmail.com"}],"time":{"modified":"2022-06-18T23:14:41.009Z","created":"2013-01-29T23:27:30.388Z","0.0.0":"2013-01-29T23:27:31.301Z","0.0.1":"2013-02-24T22:19:29.016Z","0.0.2":"2013-03-12T05:30:14.702Z","0.0.4":"2014-06-05T00:45:03.909Z","0.0.5":"2014-06-12T22:42:08.225Z","0.0.6":"2014-08-31T19:39:20.421Z","0.0.7":"2014-09-18T20:53:17.371Z","0.0.8":"2015-04-10T15:50:34.702Z"},"repository":{"type":"git","url":"git://github.com/crcn/hurryUp.js.git"},"homepage":"https://github.com/crcn/hurryUp.js","bugs":{"url":"https://github.com/crcn/hurryUp.js/issues"},"license":"BSD","readmeFilename":"README.md"}