{"_id":"timeout-abort-controller","_rev":"5-c1075dfa1aa5466043d18a1e309a4764","name":"timeout-abort-controller","dist-tags":{"latest":"3.0.0"},"versions":{"1.0.0":{"name":"timeout-abort-controller","version":"1.0.0","description":"An AbortController that aborts after a specified timeout","main":"index.js","scripts":{"test":"npm run lint && nyc --reporter=lcov --reporter=text ava --verbose","lint":"standard"},"keywords":[],"author":{"name":"Jacob Heun"},"license":"MIT","dependencies":{"abort-controller":"^3.0.0","retimer":"^2.0.0"},"devDependencies":{"ava":"^2.4.0","delay":"^4.3.0","nyc":"^14.1.1","standard":"^14.3.1"},"ava":{"babel":false,"compileEnhancements":false,"failWithoutAssertions":false},"repository":{"type":"git","url":"git+https://github.com/jacobheun/timeout-abort-controller.git"},"bugs":{"url":"https://github.com/jacobheun/timeout-abort-controller/issues"},"homepage":"https://github.com/jacobheun/timeout-abort-controller#readme","gitHead":"2916b50f4c93cee0f2502abe34638408b2890eea","_id":"timeout-abort-controller@1.0.0","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-pzJMQutdN6kkO2H+MkyH4kbi+ij3ja8zlPwPOi4ulnilmwo4kuXwsS3amULGnHtEKmQMUc3PJ1HwliegyMg04Q==","shasum":"bc39ce4f60eadb499a380b1a867d420f47fb4bff","tarball":"https://registry.npmjs.org/timeout-abort-controller/-/timeout-abort-controller-1.0.0.tgz","fileCount":4,"unpackedSize":4662,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd74g1CRA9TVsSAnZWagAAdLAP/iC/E8l4o06USng7VORl\nsL/JNd2XkNYCV97/fuvGqwaGBmhWQ1uoCfseTwa/82qIdOG76d7//uTRvCEA\nhXj0pq0aHuBqUkR4w6lWnMeJL3nKANG83h0BgrrxqDNJ/1PirMVcJRTvUkXc\nhaUnIUuif3fGBKLZ9Z2TGjmNiXu5UXlCWc9Ss39RDKYVpBXfyDdN40S5imKN\nQFSxpYFAYgYEA4JWx+aI3dc64Ns4JOq4ImXPg99UXGe7rW/PM7RRK5Q7cAkV\nPMjMtbzcti03pKyV/9MqBuHownHPmEbgLfkinUz8xl1IK2XqhmraV5zxe5L7\nd4yfls+KeHBuuEffu5JtNcgenNmCYUq+G3hCmZmA6fIJ4HI9z7jz+7vhchol\nwKdpj75RPqOoCe5i+UCpAaJL8UFf0ug+K3tN/X6R0NHOqueQ9+c8DXltKHA2\neLw0OsqMwwG8/dXOvt7+OWmA91wtRqCGqVbP77mYm5gjcNcTjHmzVeidCM84\nTfM/kFLKRbaIwZ7V56LG4LvyGltGU+no1csahXSD2eBnAkL0Zeub5fGzmot3\nKkrg4laDzlMt4j3FMKJZ81tpYav1eYQNKobOba5C1W3GyfQZ/IkS7GDlWhph\nQSVEcIj0IUxQXybdaOTDSpGZk8S7zMQUPzVYX1oqrKALkYOz4djMwn0QNRwv\nE4/j\r\n=CX+i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCErOUTzeFU155EDlmsDQXBeTRlSeAwS8mOAk1TodZRbAIgfkN1ITRq0jFpkYoMZPUndrquN9KlXdXfMQkNECwgc+Q="}]},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"}],"_npmUser":{"name":"jacobheun","email":"jacobheun@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeout-abort-controller_1.0.0_1575979061271_0.5207121912907451"},"_hasShrinkwrap":false},"1.1.0":{"name":"timeout-abort-controller","version":"1.1.0","description":"An AbortController that aborts after a specified timeout","main":"index.js","scripts":{"test":"npm run lint && nyc --reporter=lcov --reporter=text ava --verbose","lint":"standard"},"keywords":[],"author":{"name":"Jacob Heun"},"license":"MIT","dependencies":{"abort-controller":"^3.0.0","retimer":"^2.0.0"},"devDependencies":{"ava":"^2.4.0","delay":"^4.3.0","nyc":"^14.1.1","standard":"^14.3.1"},"ava":{"babel":false,"compileEnhancements":false,"failWithoutAssertions":false},"repository":{"type":"git","url":"git+https://github.com/jacobheun/timeout-abort-controller.git"},"bugs":{"url":"https://github.com/jacobheun/timeout-abort-controller/issues"},"homepage":"https://github.com/jacobheun/timeout-abort-controller#readme","gitHead":"9fab367916bda12d08e24250e5614db78d79517f","_id":"timeout-abort-controller@1.1.0","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-xLV+Ms6mDc8UKpBAGGwRkZ137VqS63nGYRnzvI2f1bbv5TWqr4S7ST81870ekn+zlODruVsUexU6GCnErkM7Pw==","shasum":"7b7a8b1d5f88199898312d77c7d48ef605dcaf32","tarball":"https://registry.npmjs.org/timeout-abort-controller/-/timeout-abort-controller-1.1.0.tgz","fileCount":4,"unpackedSize":4946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+tM+CRA9TVsSAnZWagAAZw0P+wWiok53NapM8/Low9pm\nqMwsNFuNQUbzC7kZkHaDUr0Pm5z1SaZBq1de1F97rjrl7xle04LbNiAFX1Oj\nlGMqWctFkjBB+OdEKmcMGLA9d4MF5WLZDvJ9pd21OxLMyDx/Vu3q6iQX+twc\n1hZ9iBmukZf3bWEAq7vDmLGCJo9npYTEzBlgEXVJW4sbAPaR7IUn7t7ygl7A\nW4D6Az967QKF9tBVK5HMr4AkISjtBJP3p1mYXAEocf2SsFYfUIcWZPooUgb/\nr+EzKN2vcxJnoShLaOh8vXty85imAfx5kljDpnk0egep2LVKlvd1Rmt3xjev\n/sQnebXDSr7jUYE+PJE2KEtqJNGubJLshS0zoyGgqinVnRkvW3SY3OuL+SUe\nPS2Wc70YngGsUqu1oApTvpotY3sWzz7W/YOE6gy51vzHIQUADIJqoimtN6X0\nOJMhrREIn7QH6Bl+1QNM93CgFmk5pAwDehgx89mbARakQDlXr5ioF9B+Eemi\nqflwZriS3c+UTLO0kvD4/rbVoeM9//pZsgatnV87Aa1YQryFJomy5n1PulIS\nCRpiTae5iZ/rfRBfd/yOQT3UsXkh5YJL9KcVUubKvkuql3Yn/a7+TCAHYvbp\n3Y7ykd+tvI2IMEH9ebuTJ/hWrZOzNxVUuVTXxUNMEUqjxoLV17uZh6HC26dY\nClia\r\n=h4pH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGQN8mxK9HMVGFs3elniaUuzjnTFTQAO4xomrQG2dm1TAiEAirazNVxn0eHwhUf2Cfb5tG1wbDFMPgE0lco0tTTC/CU="}]},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"}],"_npmUser":{"name":"jacobheun","email":"jacobheun@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeout-abort-controller_1.1.0_1576719165344_0.23539927138789585"},"_hasShrinkwrap":false},"1.1.1":{"name":"timeout-abort-controller","version":"1.1.1","description":"An AbortController that aborts after a specified timeout","main":"index.js","scripts":{"test":"npm run lint && nyc --reporter=lcov --reporter=text tape test.js","test:browser":"npm run test:chrome && npm run test:firefox && npm run test:webkit","test:chrome":"playwright-test test.js --browser chromium --runner tape","test:firefox":"playwright-test test.js --browser firefox --runner tape","test:webkit":"playwright-test test.js --browser webkit --runner tape","lint":"standard"},"keywords":[],"author":{"name":"Jacob Heun"},"license":"MIT","dependencies":{"abort-controller":"^3.0.0","retimer":"^2.0.0"},"devDependencies":{"delay":"^4.3.0","nyc":"^15.0.1","playwright-test":"^0.7.1","standard":"^14.3.1","tape":"^5.0.1"},"repository":{"type":"git","url":"git+https://github.com/jacobheun/timeout-abort-controller.git"},"bugs":{"url":"https://github.com/jacobheun/timeout-abort-controller/issues"},"homepage":"https://github.com/jacobheun/timeout-abort-controller#readme","gitHead":"91af0118f62950b82b9d8de89d4e1e40803968cd","_id":"timeout-abort-controller@1.1.1","_nodeVersion":"12.16.1","_npmVersion":"6.14.2","dist":{"integrity":"sha512-BsF9i3NAJag6T0ZEjki9j654zoafI2X6ayuNd6Tp8+Ul6Tr5s4jo973qFeiWrRSweqvskC+AHDKUmIW4b7pdhQ==","shasum":"2c3c3c66f13c783237987673c276cbd7a9762f29","tarball":"https://registry.npmjs.org/timeout-abort-controller/-/timeout-abort-controller-1.1.1.tgz","fileCount":4,"unpackedSize":5544,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe33jbCRA9TVsSAnZWagAA9IwP/RqsIQDJx6Iso41/ep++\npGcRhIHOwrKqu8lIaasSfE5zFTNGWWxUISpIpGgviHTXpiQLSJ2E4SKtX0uW\nAdrkh2/gFWP+cCMuNTebp1vIOJeSc6J4B4bSxPsE1NWfd74i8FscnsNdsYRI\n9F4wpkj7rychPAp/ONxcnYCF7vh8Vj/aO0n1x7ufQ3ZDH5+dfBKd1m7b7K2+\nanAjAZjxeWGWAC3nXUxhTNrgmwLRa64PiKvFkDAB5ow/1YvEGnJmL4qlTfvx\n2Uc4KoaoZfgtnmBLP+Wn5xKtXtqVIrDUFzKyFnO1QlFu77oGuBS5jubjWTaB\n4l5gI+bHvV5fYNzElV4FAnFj5ySBiEAwd/TG8TpO8FrW1gupNJ6fiJlSnxft\nrv+ikVIsQ/XmTf0y4K4Q8d4AMYMhOfkL2haYHS/PYvp94TYC9OBeKjJGBcim\nOlvMcVDAzBDQl+VGj//CmXBWF5FKXIc4ZnP4ticv8wLWmmvzqof4aRuXMOt6\nZKlXW8z/K3iKcytDkdl5aJ++2GWzzixeRzL1Heyxjo9ETX9hFrHAPo0Jc2Vb\nHBjbYp9mZUmN2Pk9pWYHbzS23nxPp/J6Ola1J3jHn0OW8BBElKVi3A71qPTc\nswXDYVW2tRT7a1jkn5HmVELQiAqQ1gDL+rO8eP3OSYt/RyO5qQh1q8OXK2xL\nMEAf\r\n=O2Xv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICRgFleTa5JQlgVTLUmcesbTYmhgOiEs5WeU8jG+lmjtAiEAuW/+GkbQjrV4TfPUC+i3DGCvfWYOaojlh6PZufp71Xk="}]},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"}],"_npmUser":{"name":"jacobheun","email":"jacobheun@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeout-abort-controller_1.1.1_1591703771262_0.07418187832097134"},"_hasShrinkwrap":false},"2.0.0":{"name":"timeout-abort-controller","version":"2.0.0","description":"An AbortController that aborts after a specified timeout","main":"index.js","scripts":{"test":"npm run lint && nyc --reporter=lcov --reporter=text tape test.js","test:browser":"npm run test:chrome && npm run test:firefox && npm run test:webkit","test:chrome":"playwright-test test.js --browser chromium --runner tape","test:firefox":"playwright-test test.js --browser firefox --runner tape","test:webkit":"playwright-test test.js --browser webkit --runner tape","lint":"standard","prepare":"rimraf dist && tsc --emitDeclarationOnly --declarationDir dist"},"keywords":[],"author":{"name":"Jacob Heun"},"license":"MIT","dependencies":{"abort-controller":"^3.0.0","native-abort-controller":"^1.0.4","retimer":"^3.0.0"},"devDependencies":{"@types/tape":"^4.13.2","delay":"^5.0.0","nyc":"^15.0.1","playwright-test":"^7.1.0","rimraf":"^3.0.2","standard":"^16.0.3","tape":"^5.0.1","typescript":"^4.1.3"},"repository":{"type":"git","url":"git+https://github.com/jacobheun/timeout-abort-controller.git"},"bugs":{"url":"https://github.com/jacobheun/timeout-abort-controller/issues"},"homepage":"https://github.com/jacobheun/timeout-abort-controller#readme","types":"dist/index.d.ts","gitHead":"91e9ec9c602356bed91f6cb1eaf9071c7d99da61","_id":"timeout-abort-controller@2.0.0","_nodeVersion":"16.10.0","_npmVersion":"7.24.0","dist":{"integrity":"sha512-2FAPXfzTPYEgw27bQGTHc0SzrbmnU2eso4qo172zMLZzaGqeu09PFa5B2FCUHM1tflgRqPgn5KQgp6+Vex4uNA==","shasum":"d6a59209132e520413092dd4b4d71eaaf5887feb","tarball":"https://registry.npmjs.org/timeout-abort-controller/-/timeout-abort-controller-2.0.0.tgz","fileCount":5,"unpackedSize":6065,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDmVSduti2VMbdDg+AvPEN3snu8Jh2g+TkbqEfq1/6bcAiAmZDn1X2BxRstcbUzonDqGTIDL9Ll1dzopX2Rx+5oK/A=="}]},"_npmUser":{"name":"jacobheun","email":"jacobheun@gmail.com"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeout-abort-controller_2.0.0_1633458751594_0.7437365117594299"},"_hasShrinkwrap":false},"3.0.0":{"name":"timeout-abort-controller","version":"3.0.0","description":"An AbortController that aborts after a specified timeout","main":"index.js","scripts":{"test":"npm run lint && nyc --reporter=lcov --reporter=text tape test.js","test:browser":"npm run test:chrome && npm run test:firefox && npm run test:webkit","test:chrome":"playwright-test test.js --browser chromium --runner tape","test:firefox":"playwright-test test.js --browser firefox --runner tape","test:webkit":"playwright-test test.js --browser webkit --runner tape","lint":"standard","prepare":"rimraf dist && tsc --emitDeclarationOnly --declarationDir dist"},"keywords":[],"author":{"name":"Jacob Heun"},"license":"MIT","dependencies":{"retimer":"^3.0.0"},"devDependencies":{"@types/tape":"^4.13.2","delay":"^5.0.0","nyc":"^15.0.1","playwright-test":"^7.1.0","rimraf":"^3.0.2","standard":"^16.0.3","tape":"^5.0.1","typescript":"^4.1.3"},"repository":{"type":"git","url":"git+https://github.com/jacobheun/timeout-abort-controller.git"},"bugs":{"url":"https://github.com/jacobheun/timeout-abort-controller/issues"},"homepage":"https://github.com/jacobheun/timeout-abort-controller#readme","types":"dist/index.d.ts","gitHead":"605ca885d95631124ceaca3016c6c69f9966665e","_id":"timeout-abort-controller@3.0.0","_nodeVersion":"16.10.0","_npmVersion":"7.24.0","dist":{"integrity":"sha512-O3e+2B8BKrQxU2YRyEjC/2yFdb33slI22WRdUaDx6rvysfi9anloNZyR2q0l6LnePo5qH7gSM7uZtvvwZbc2yA==","shasum":"dd57ffca041652c03769904f8d95afd93fb95595","tarball":"https://registry.npmjs.org/timeout-abort-controller/-/timeout-abort-controller-3.0.0.tgz","fileCount":5,"unpackedSize":5907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3rtQCRA9TVsSAnZWagAAtkcP/jE4UvFVlCfxv9qd3nqr\niYGBcoHvETlM+yez5yFPLwDSfKzZdU0FV8gsebkFa2QtmYt9nfRpQ73ujXDW\nvK/X/2V4rbkP/VvBPUOFPxyNFA+CbIGIfzOx48x951PkfFNrEfOZmbmj1q3f\nWDXvgQj9VJdSIvyaoHp+hsGvOOkLOu+su9OFMPfoYW1HZwu1mpQfv7x9UkYi\nrB5ThgBoQt9d6ic1CCCSAqiX3lvBjfpYp/E8cqUd91fbUcmdFRcUXtcBEQ5u\nQY+bTUoBPRWs8ETruv5irYv8uNSTgyMkWSMbY/w61xMkrMYdpDDRyF9RBdOF\nO7H1JSuGGMAsKyiNxcaLf0PYVJ9304HAdlyV4wQltouUzsPS31SYkTzj+Bj5\n/J/oDq9xvJY52YIG93Cbi3Pn/d6FoWV/vzIf4yXeDjtbNe16BoXMfJqIioH2\nIaiiyhe7WIuAwMUe1OO28/hdbq4ujcNyJIhPyApQFDofQnwrGo39ytS7dUj7\nfr3Sdc2L9g0dv9Z6yFssfJK1rrgDOcRuVNG/o6hGZUf7uQzVABm3/Dz6EvSc\nIML90q6+gO4ye1QO7Y6z2mjrdPUZVkpY4Dutqv6A3lcIHAV3wsEza/zcjFRc\nOu02mu6vhtIXtVjuqtqCW6a9bROt4GyAikYqjz/BLUgJMocResufIg7Hc91B\nW2Wn\r\n=SHdL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA/JMcaTpDCHhcG7BL3chUIl4SgHp/qwwJ+3lAh3bN1dAiAzoD1RNRXWHP9DSwmDRNGMjAhF7CbV1m+8xYS+mnECiQ=="}]},"_npmUser":{"name":"jacobheun","email":"jacobheun@gmail.com"},"directories":{},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timeout-abort-controller_3.0.0_1641986896800_0.5078414958027704"},"_hasShrinkwrap":false}},"time":{"created":"2019-12-10T11:57:41.271Z","1.0.0":"2019-12-10T11:57:41.432Z","modified":"2022-05-21T21:05:36.110Z","1.1.0":"2019-12-19T01:32:45.483Z","1.1.1":"2020-06-09T11:56:11.427Z","2.0.0":"2021-10-05T18:32:31.912Z","3.0.0":"2022-01-12T11:28:16.947Z"},"maintainers":[{"name":"jacobheun","email":"jacobheun@gmail.com"}],"description":"An AbortController that aborts after a specified timeout","homepage":"https://github.com/jacobheun/timeout-abort-controller#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/jacobheun/timeout-abort-controller.git"},"author":{"name":"Jacob Heun"},"bugs":{"url":"https://github.com/jacobheun/timeout-abort-controller/issues"},"license":"MIT","readme":"# timeout-abort-controller\n\n[![Build Status](https://travis-ci.com/jacobheun/timeout-abort-controller.svg?branch=master)](https://travis-ci.com/jacobheun/timeout-abort-controller) [![dependencies Status](https://david-dm.org/jacobheun/timeout-abort-controller/status.svg)](https://david-dm.org/jacobheun/timeout-abort-controller) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n> An AbortController that aborts after a specified timeout.\n\n`timeout-abort-controller` uses [`retimer`](https://github.com/mcollina/retimer) internally to help reduce the impact of having numerous timers running.\n\n## Install\n\n```\nnpm install timeout-abort-controller\n```\n\n## Usage\n\n```js\nconst { AbortController } = require('native-abort-controller')\nconst { TimeoutController } = require('timeout-abort-controller')\nconst anySignal = require('any-signal')\n\nconst userController = new AbortController()\n// Aborts after 1 second\nconst timeoutController = new TimeoutController(1000)\n\nconst combinedSignal = anySignal([userController.signal, timeoutController.signal])\ncombinedSignal.addEventListener('abort', () => console.log('Abort!'))\n\n// The user or the timeout can now abort the action\nawait performSomeAction({ signal: combinedSignal })\ntimeoutController.clear()\n```\n\n## API\n\n### `new TimeoutController(ms)`\n\nCreates an [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) compliant `TimeoutController`.\n\n#### Parameters\n\n| Name | Type | Description |\n|------|------|-------------|\n| ms | number | The time in milliseconds for when the TimeoutController should abort |\n\n### `timeoutController.clear()`\n\nClears the internal timer.\n\n### `timeoutController.abort()`\n\nAborts the controller and clears the internal timeout.\n\n### `timeoutController.reset()`\n\nClears the timer and sets the internal timeout to occur after the `ms` timeout it was created with.\n\n## Related\n\n- [`abort-controller`](https://github.com/mysticatea/abort-controller)\n- [`native-abort-controller`](https://github.com/achingbrain/native-abort-controller)\n- [`any-signal`](https://github.com/jacobheun/any-signal) Combines an array of AbortSignals into a single signal.\n\n## LICENSE\n\n[MIT](LICENSE) © Jacob Heun\n","readmeFilename":"README.md"}