{"_id":"promise-timeout","_rev":"10-a43cb5fee7ee9cc7a7b7c7c4eeae4270","name":"promise-timeout","description":"Simple timeouts for promises","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"promise-timeout","version":"1.0.0","description":"Simple timeouts for promises","main":"index.js","scripts":{"test":"mocha"},"keywords":["promise","timeout"],"author":{"name":"David M. Lee, II","email":"leedm777@yahoo.com"},"license":"MIT","devDependencies":{"mocha":"^2.3.4"},"gitHead":"5abcfb0e92e1f27bba4e276330d7ed7fd1b5d0f8","_id":"promise-timeout@1.0.0","_shasum":"18c960a6e9d3671d49025edbfbb8c9c9bafaaa52","_from":".","_npmVersion":"3.4.0","_nodeVersion":"4.2.2","_npmUser":{"name":"leedm777","email":"leedm777@yahoo.com"},"maintainers":[{"name":"leedm777","email":"leedm777@yahoo.com"}],"dist":{"shasum":"18c960a6e9d3671d49025edbfbb8c9c9bafaaa52","tarball":"https://registry.npmjs.org/promise-timeout/-/promise-timeout-1.0.0.tgz","integrity":"sha512-wtUvtu/CqQAIdjLpQDyNFV+S2mAGoutF0/U8eKShGBb77cKSQpY7m8r/onmM957dFKzJu0cack/vGOe0tsXBRA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCR/b/H9YqYiJHDRnrimGSNB909sliVkvSvZxGVeKihjQIhAI+/WuRrNBhFjU0crNduIR9A6KJRVJ2VDM3I0ryPOyZh"}]},"directories":{}},"1.1.0":{"name":"promise-timeout","version":"1.1.0","description":"Simple timeouts for promises","main":"index.js","scripts":{"test":"mocha"},"keywords":["promise","timeout"],"author":{"name":"David M. Lee, II","email":"leedm777@yahoo.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/building5/promise-timeout.git"},"devDependencies":{"mocha":"^3.2.0"},"gitHead":"1d7fbb18e6f8256645c165bb07c83a3b2bf5d116","bugs":{"url":"https://github.com/building5/promise-timeout/issues"},"homepage":"https://github.com/building5/promise-timeout#readme","_id":"promise-timeout@1.1.0","_shasum":"d5d54795a247160171d6bbd69eca224b0fd91575","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"leedm777","email":"leedm777@yahoo.com"},"maintainers":[{"name":"leedm777","email":"leedm777@yahoo.com"}],"dist":{"shasum":"d5d54795a247160171d6bbd69eca224b0fd91575","tarball":"https://registry.npmjs.org/promise-timeout/-/promise-timeout-1.1.0.tgz","integrity":"sha512-4hfkXzBBwEP6F9bznFYMy+UsFhuH9Yy5VbFp9cgfBmbCCXpp+bR40IKD5tqEoHP2LZKw4ciLMV1EaT3jwenW/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrx96LZT9NnORKWsNrUKvtkYK2lqcQrsE0fkgVn1D5yAIgVCahDNYSHAJ2F1iue1CwwPwnfuS98itreR5IiaVrbG0="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/promise-timeout-1.1.0.tgz_1488867950881_0.9701610011979938"},"directories":{}},"1.1.1":{"name":"promise-timeout","version":"1.1.1","description":"Simple timeouts for promises","main":"index.js","scripts":{"test":"mocha"},"keywords":["promise","timeout"],"author":{"name":"David M. Lee, II","email":"leedm777@yahoo.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/building5/promise-timeout.git"},"devDependencies":{"mocha":"^3.2.0"},"gitHead":"de04470e6c802ee2849d011fcf2ee140368d2c43","bugs":{"url":"https://github.com/building5/promise-timeout/issues"},"homepage":"https://github.com/building5/promise-timeout#readme","_id":"promise-timeout@1.1.1","_shasum":"9d3f0c834411a17ea81786e0355f7cdf1ecf5597","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"leedm777","email":"leedm777@yahoo.com"},"maintainers":[{"name":"leedm777","email":"leedm777@yahoo.com"}],"dist":{"shasum":"9d3f0c834411a17ea81786e0355f7cdf1ecf5597","tarball":"https://registry.npmjs.org/promise-timeout/-/promise-timeout-1.1.1.tgz","integrity":"sha512-pM00yVjcSNGxVWiAFUMa6Yv0YbHqT8zRw/9q/N4DAFAfmmdoMZSMU1F+3Mnn7KyuD9NRXnZ/7OTlChC1vY0Ckg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxmHqfUHZnwcPp57R0YjduvbTULHGE3HgGK/qN7eVYpwIhALaoKJ5Fv1ZI7D+sjjDi3yh8apswADdHD2oH4PSx/5qm"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/promise-timeout-1.1.1.tgz_1490132672526_0.19347943481989205"},"directories":{}},"1.2.0":{"name":"promise-timeout","version":"1.2.0","description":"Simple timeouts for promises","main":"index.js","scripts":{"test":"mocha"},"keywords":["promise","timeout"],"author":{"name":"David M. Lee, II","email":"leedm777@yahoo.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/building5/promise-timeout.git"},"devDependencies":{"mocha":"^3.2.0"},"gitHead":"28e1d01327a13ee70d8143432374160e189008b1","bugs":{"url":"https://github.com/building5/promise-timeout/issues"},"homepage":"https://github.com/building5/promise-timeout#readme","_id":"promise-timeout@1.2.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"leedm777","email":"leedm777@yahoo.com"},"maintainers":[{"name":"leedm777","email":"leedm777@yahoo.com"}],"dist":{"integrity":"sha512-bk/bfs4gdMjqRXk8lqJUOq5UWUk6J0CiEGxPzFJbpIY6CfBOb6jkbiOqy4G+zYaZUpWYmS/gkzZlZyPBLeFpZw==","shasum":"7b483c9585ae6c2b2be624bafae42a75128f8f84","tarball":"https://registry.npmjs.org/promise-timeout/-/promise-timeout-1.2.0.tgz","fileCount":6,"unpackedSize":5978,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2dxyfwguRHJuaNzR3H4FP5aZHt9ID60k56zCWyUfHNAIgNyrCz0bK/9dA53cXDXPFVLcNf6PqXQ7XfiOBjLWbAZ8="}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-timeout_1.2.0_1518139741369_0.2571856133320345"},"_hasShrinkwrap":false},"1.3.0":{"name":"promise-timeout","version":"1.3.0","description":"Simple timeouts for promises","main":"index.js","scripts":{"test":"mocha"},"keywords":["promise","timeout"],"author":{"name":"David M. Lee, II","email":"leedm777@yahoo.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/building5/promise-timeout.git"},"devDependencies":{"mocha":"^3.2.0"},"gitHead":"4a09650f9e8935324844f283014836c9bc2d98d7","bugs":{"url":"https://github.com/building5/promise-timeout/issues"},"homepage":"https://github.com/building5/promise-timeout#readme","_id":"promise-timeout@1.3.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"leedm777","email":"leedm777@yahoo.com"},"maintainers":[{"name":"leedm777","email":"leedm777@yahoo.com"}],"dist":{"integrity":"sha512-5yANTE0tmi5++POym6OgtFmwfDvOXABD9oj/jLQr5GPEyuNEb7jH4wbbANJceJid49jwhi1RddxnhnEAb/doqg==","shasum":"d1c78dd50a607d5f0a5207410252a3a0914e1014","tarball":"https://registry.npmjs.org/promise-timeout/-/promise-timeout-1.3.0.tgz","fileCount":6,"unpackedSize":6089,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIErpaMZvpSnySgDEXW+hyO/G8Pcr07MXSkn34Rxp9OuJAiEAwdqCtarlLtrqJocA00V22BTAj6qfpOhTRN9xMV1FV7Y="}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-timeout_1.3.0_1518969762912_0.6634729544890283"},"_hasShrinkwrap":false}},"readme":"# promise-timeout\n\nA super-simple way to put a timeout on promise resolution.\n\nIt assumes you already have either platform support for promises (Node 0.12 or\ngreater), or you have a polyfill (see [es6-promise][]).\n\n## Installation\n\n```bash\n$ npm install promise-timeout\n```\n\n## Usage\n\n### timeout(promise, timeoutMillis)\n\nRejects a promise with a `TimeoutError` if it does not settle within the\nspecified timeout. Parameters:\n\n * `promise: Promise` - Promise to monitor.\n * `timeoutMillis: number` - Number of milliseconds to wait on settling.\n\n## TimeoutError\n\nException indicating that the timeout expired.\n\n## Examples\n\nES2015:\n\n```javascript\nimport { timeout, TimeoutError } from 'promise-timeout';\n\nlet somePromise = goDoSomething();\n\ntimeout(somePromise, 1000)\n  .then((thing) => console.log('I did a thing!'))\n  .catch((err) => {\n    if (err instanceof TimeoutError) {\n      console.error('Timeout :-(');\n    }\n  });\n```\n\nES5:\n\n```javascript\n'use strict';\n\nvar pt = require('promise-timeout');\n\nvar somePromise = goDoSomething();\n\npt.timeout(somePromise, 1000)\n  .then(function (thing) {\n    console.log('I did a thing!');\n  }).catch(function (err) {\n    if (err instanceof pt.TimeoutError) {\n      console.error('Timeout :-(');\n    }\n  });\n```\n\n [es6-promise]: https://www.npmjs.com/package/es6-promise\n","maintainers":[{"name":"leedm777","email":"leedm777@yahoo.com"}],"time":{"modified":"2022-06-24T19:11:26.133Z","created":"2015-11-18T18:47:57.545Z","1.0.0":"2015-11-18T18:47:57.545Z","1.1.0":"2017-03-07T06:25:55.933Z","1.1.1":"2017-03-21T21:44:34.493Z","1.2.0":"2018-02-09T01:29:02.268Z","1.3.0":"2018-02-18T16:02:43.006Z"},"keywords":["promise","timeout"],"author":{"name":"David M. Lee, II","email":"leedm777@yahoo.com"},"license":"MIT","readmeFilename":"README.md","users":{"peterkingsbury":true,"milichev":true},"homepage":"https://github.com/building5/promise-timeout#readme","repository":{"type":"git","url":"git+https://github.com/building5/promise-timeout.git"},"bugs":{"url":"https://github.com/building5/promise-timeout/issues"}}