{"_id":"@amphibian/promise-timeout","_rev":"2-701e7eb1cfd6229a11984777c221da0a","name":"@amphibian/promise-timeout","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@amphibian/promise-timeout","version":"1.0.0","description":"promise timeouts","main":"index.js","browser":"index.browser.js","repository":{"type":"git","url":"git+https://github.com/amphibian-no/promise-timeout.git"},"author":{"name":"Thomas Lindstrøm","email":"t@hom.as"},"scripts":{"test":"jest --coverage","lint":"xo","fix":"xo --fix","build":"node build.js","prepublish":"npm run build"},"license":"MIT","devDependencies":{"@babel/core":"^7.4.3","@babel/plugin-transform-runtime":"^7.4.3","@babel/preset-env":"^7.4.3","babel-eslint":"^10.0.1","eslint-config-amphibian":"^1.1.2","fs-extra":"^7.0.1","jest":"^23.6.0","xo":"^0.23.0"},"xo":{"parser":"babel-eslint","extends":["eslint-config-amphibian"],"overrides":[{"files":"test.js","envs":["jest"]}]},"dependencies":{"@babel/runtime-corejs2":"^7.4.5"},"bugs":{"url":"https://github.com/amphibian-no/promise-timeout/issues"},"homepage":"https://github.com/amphibian-no/promise-timeout#readme","_id":"@amphibian/promise-timeout@1.0.0","_nodeVersion":"10.16.2","_npmVersion":"6.11.3","dist":{"integrity":"sha512-+aBAaKCBdq0qL+ji96YcjKbNC3XPXEDnclOajJ1vhhLd0TjT8WX2+gCdi9r9+prodLY76RbgTbQvxG06EoeOzw==","shasum":"ddaeaa9d08d673d014a02f8fefffd45b1fb30f4d","tarball":"https://registry.npmjs.org/@amphibian/promise-timeout/-/promise-timeout-1.0.0.tgz","fileCount":7,"unpackedSize":5909,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdi0tzCRA9TVsSAnZWagAAyWYQAJGPXwJUwuP/9zJq8E1G\nysfTllYvOV5mPtVuEA3f87/WfwMCGDNq2dboG2Ck7hC/FXGRBK84P0DEa8BP\nLwFZewWbC3U6UKKVPUrB43g/SUCOfavwkDHy31njA4ak3touK1WF59T5AmAY\n0+rq2N38L15eK1YP80jZaCIkJkiWy41cJycpA2oC1CkVIJW7fGr8j8hQIute\noSssZfNYOFK8aAK7g/PyxDP45rkTxh1l9yLDPhSCLAPcefOKYJUHCtQWcToY\nVagpoRinYBrOFk0aO6HYRp2nzsXQfetbfcLvWksKziPqcZ7jD3jCaDHb8VdQ\nMMbSflFdjr1En3kGlnNpJoyDmBQLule9Hp71K2TAmI/g/rlxyYK+DBGU5qT5\nyBmhaU2DNYUEhu6XWKQ4S+mQFEOHLdRYD+vE7lwYPm6WBrD8Qdp6kvmHI5/3\nT+8YtQUPBFHZurO2UJr/ql6DSCRmDCwSLy5kSmXuE6p2ugOzqTVw3R5ci/Az\n42iAjCgX70epRNaRDzyAQUxUzowa1iwxIV+p/TTj4IoMdJT3itUsb9sKZ1IZ\n2CJ6p2Y7LVYbMhviP+qkqBy8YMgK/mrLK6gxTePypOBlz/+p4DSOxBbjBFaB\nw62CWlFYKoodFze6BOp1hDJykqxJ1UBsaHalMMAW5WIOB46tEPm+4RuNakY9\nIXn+\r\n=fVMl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5VpqlXSTs7y4sZUuAXGE5hHM2+werVlA+hunlniYWiAIhAJwRxya+RdphbVWYoefCbeok5vXa8ea886TbgUakvrdY"}]},"maintainers":[{"name":"thomaslindstr_m","email":"t@hom.as"}],"_npmUser":{"name":"thomaslindstr_m","email":"t@hom.as"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-timeout_1.0.0_1569409907324_0.5727150131325265"},"_hasShrinkwrap":false},"1.0.1":{"name":"@amphibian/promise-timeout","version":"1.0.1","description":"promise timeouts","main":"index.js","browser":"index.browser.js","repository":{"type":"git","url":"git+https://github.com/amphibian-no/promise-timeout.git"},"author":{"name":"Thomas Lindstrøm","email":"t@hom.as"},"scripts":{"test":"jest --coverage","lint":"xo","fix":"xo --fix","build":"node build.js","prepublish":"npm run build"},"license":"MIT","devDependencies":{"@babel/core":"^7.4.3","@babel/plugin-transform-runtime":"^7.4.3","@babel/preset-env":"^7.4.3","babel-eslint":"^10.0.1","eslint-config-amphibian":"^1.1.2","fs-extra":"^7.0.1","jest":"^23.6.0","xo":"^0.23.0"},"xo":{"parser":"babel-eslint","extends":["eslint-config-amphibian"],"overrides":[{"files":"test.js","envs":["jest"]}]},"dependencies":{"@babel/runtime-corejs2":"^7.4.5"},"gitHead":"122b58e9a85a2f6052faf94d47a3f6c069cb997b","bugs":{"url":"https://github.com/amphibian-no/promise-timeout/issues"},"homepage":"https://github.com/amphibian-no/promise-timeout#readme","_id":"@amphibian/promise-timeout@1.0.1","_nodeVersion":"10.16.2","_npmVersion":"6.11.3","dist":{"integrity":"sha512-ZitvAuQbBSFDi55RjzEZ6eJ6b4IV+5/aDIao7uzQ/A3ErzzQ7JFSgCnYbX1NQT4aBYc34TZuj3YwUjd+qTY3wg==","shasum":"cccd75f284db88ac581664a55ce502747373beaf","tarball":"https://registry.npmjs.org/@amphibian/promise-timeout/-/promise-timeout-1.0.1.tgz","fileCount":7,"unpackedSize":5919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdi0w5CRA9TVsSAnZWagAAXjcP/ioIP+YevTPLWfz7gN0t\nMSRZ98n1ePcVGH74yVAzNslEyxu39gVySk6gdoKvkI91lWFNUggbPfOlXuwr\npVrzdP42woWTs5uu6h014oLt3TKKQAeqjmVGcuS9Pg3xa1PQwn3Qs/XnBe1i\nNSi1R962n89VkBpfEfzGDQ+jrP/jAgMZREOlj5Lj6ROvmkGvm8tYmxgYFToO\nGZc0F2cFSE/P0Blj6xDlEoQ0RWcWEp8OLZQU994oOo639Mw5ELPlYqduBO4p\n0XYi4t5yfeaC0c30NuysjTeloPIQglNjUsBGsUq/IlthPwEr2gTqnhtrxpfE\nZ6Ys/Kg82KhHfyeNKQBCNdmQgzQsp6KKlDQDsctsISFLLcG5yWjojlXANKF9\nUivM5COpqn1CJywSZR3PXGmBqdZEBsiP10vn6BNCI2aFJqqGMvGJfPQ10ola\nMvruxXPWpO2+x3uwCbEghX0QHhdRDQI3NVjuo1jyli1PxQM+wfiGJ35Mm/1n\nAChVz2OfQ6pMtRyC+8SOVzLvEYLY1U12EKIN676fjYZsHu56ngZltNu85FaU\nIgBTdRErWXYlrE0ra3uuRlFxIO+qgNbpcJtk04wTQNYzjg+kwiNzl895gp3A\ngpFgNqBEISjb4QF+SrDoPh6jvqs/ZOAy4x6/Tzw4DEZbHdRnAhTIulLF+Kjt\nSQ8Z\r\n=fOzt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCA4R5leLrQ9xiozL+Iw1VigwOoLVBF7jOduSG4MU1SDgIgWxHuYgC3DZn1sZM7RA/zMgiNn+xxuhikDEOmnJ5nF9w="}]},"maintainers":[{"name":"thomaslindstr_m","email":"t@hom.as"}],"_npmUser":{"name":"thomaslindstr_m","email":"t@hom.as"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-timeout_1.0.1_1569410104609_0.9891664409642336"},"_hasShrinkwrap":false}},"time":{"created":"2019-09-25T11:11:47.175Z","1.0.0":"2019-09-25T11:11:47.458Z","modified":"2022-04-04T13:51:42.466Z","1.0.1":"2019-09-25T11:15:04.720Z"},"maintainers":[{"name":"thomaslindstr_m","email":"t@hom.as"}],"description":"promise timeouts","homepage":"https://github.com/amphibian-no/promise-timeout#readme","repository":{"type":"git","url":"git+https://github.com/amphibian-no/promise-timeout.git"},"author":{"name":"Thomas Lindstrøm","email":"t@hom.as"},"bugs":{"url":"https://github.com/amphibian-no/promise-timeout/issues"},"license":"MIT","readme":"# @amphibian/promise-timeout\n\npromise timeouts\n\n```\nnpm install @amphibian/promise-timeout\n```\n\n## Usage\n\n```javascript\nimport timeout from '@amphibian/promise-timeout';\n\nasync function getUsers() {\n\tconst response = await timeout(fetch('https://reqres.in/api/users'));\n\tconst user = await response.json();\n\treturn user;\n}\n```\n\n### With options\n\n```javascript\nconst request = fetch('https://reqres.in/api/users')\n\t.then((response) => response.json());\ntimeout(request, {timeout: 2000});\n```\n\n## `timeout(function, options)`\n\n### `function` _(`Function`)_\n\nThe function to timeout. Should return a `Promise` or be `async`.\n\n### `options` _(`Object`)_\n\n#### `options.timeout` _(`Number`)_\n\n**Default**: `500`\nNumber of milliseconds to wait before throwing an error.\n","readmeFilename":"readme.md"}