{"_id":"timed-out","_rev":"4639669","name":"timed-out","description":"Timeout HTTP/HTTPS requests","dist-tags":{"latest":"7.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2026-04-10T19:37:26.000Z","created":"2014-11-21T19:18:22.681Z","7.0.0":"2025-09-09T20:37:28.193Z","6.0.0":"2021-04-22T06:31:04.635Z","5.0.0":"2019-09-08T18:46:38.585Z","4.0.1":"2017-01-16T13:58:11.638Z","4.0.0":"2016-12-29T09:59:46.455Z","3.1.3":"2016-12-29T05:29:13.281Z","3.1.2":"2016-12-28T18:18:42.636Z","3.1.1":"2016-12-27T19:13:25.410Z","3.1.0":"2016-12-14T12:03:47.576Z","3.0.0":"2016-09-18T13:30:17.923Z","2.0.0":"2014-12-02T06:59:14.579Z","1.0.0":"2014-11-21T19:18:22.681Z"},"users":{"timdp":true,"nickeltobias":true,"tobiasnickel":true,"thiagowittmann":true,"soldair":true},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/timed-out.git"},"versions":{"7.0.0":{"name":"timed-out","version":"7.0.0","description":"Timeout HTTP/HTTPS requests","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/timed-out.git"},"funding":"https://github.com/sponsors/sindresorhus","type":"module","exports":"./index.js","sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && node --test"},"keywords":["http","https","timeout","get","url","uri","request","simple"],"devDependencies":{"xo":"^1.2.2"},"_id":"timed-out@7.0.0","gitHead":"d4d40e5661f1b4083cd70a2d7d42c4e2ab90f5bd","bugs":{"url":"https://github.com/sindresorhus/timed-out/issues"},"homepage":"https://github.com/sindresorhus/timed-out#readme","_nodeVersion":"20.19.1","_npmVersion":"10.9.2","dist":{"shasum":"833d515cee7bc740d2d467e89b72ac2f7e28274d","size":2089,"noattachment":false,"key":"/timed-out/-/timed-out-7.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/timed-out/download/timed-out-7.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/timed-out_7.0.0_1757450248025_0.16424459348011156"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-09-09T20:37:28.193Z","publish_time":1757450248193,"_source_registry_name":"default","_cnpm_publish_time":1757450248193},"6.0.0":{"name":"timed-out","version":"6.0.0","description":"Timeout HTTP/HTTPS requests","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/timed-out.git"},"funding":"https://github.com/sponsors/sindresorhus","type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && mocha"},"keywords":["http","https","timeout","get","url","uri","request","simple"],"devDependencies":{"mocha":"^8.3.2","xo":"^0.39.1"},"gitHead":"bb46a6965e49e5b32752e45094ed83dfa0118a23","bugs":{"url":"https://github.com/sindresorhus/timed-out/issues"},"homepage":"https://github.com/sindresorhus/timed-out#readme","_id":"timed-out@6.0.0","_nodeVersion":"12.22.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"149db9bb185b78aab94a0eb2b1e9e132ba115591","size":2320,"noattachment":false,"key":"/timed-out/-/timed-out-6.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/timed-out/download/timed-out-6.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timed-out_6.0.0_1619073064536_0.7459153220839974"},"_hasShrinkwrap":false,"publish_time":1619073064635,"_cnpm_publish_time":1619073064635},"5.0.0":{"name":"timed-out","version":"5.0.0","description":"Timeout HTTP/HTTPS requests","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/timed-out.git"},"engines":{"node":">=8"},"scripts":{"test":"xo && mocha"},"keywords":["http","https","timeout","get","url","uri","request","simple"],"devDependencies":{"mocha":"^6.2.0","xo":"^0.24.0"},"gitHead":"9cc4ef15197e9017dd84e2639bbb7a6e09f3adf7","bugs":{"url":"https://github.com/sindresorhus/timed-out/issues"},"homepage":"https://github.com/sindresorhus/timed-out#readme","_id":"timed-out@5.0.0","_nodeVersion":"10.16.0","_npmVersion":"6.11.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"e49575f0ec50575913d9b535e5f2490510d1bc7c","size":2059,"noattachment":false,"key":"/timed-out/-/timed-out-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/timed-out/download/timed-out-5.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/timed-out_5.0.0_1567968398456_0.3844758129629249"},"_hasShrinkwrap":false,"publish_time":1567968398585,"_cnpm_publish_time":1567968398585},"4.0.1":{"name":"timed-out","version":"4.0.1","description":"Emit `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged","license":"MIT","repository":{"type":"git","url":"git+https://github.com/floatdrop/timed-out.git"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && mocha"},"files":["index.js"],"keywords":["http","https","get","got","url","uri","request","util","utility","simple"],"devDependencies":{"mocha":"*","xo":"^0.16.0"},"gitHead":"2f00fdafb6af0a9b91fb23a04a9271766c5559a4","bugs":{"url":"https://github.com/floatdrop/timed-out/issues"},"homepage":"https://github.com/floatdrop/timed-out#readme","_id":"timed-out@4.0.1","_shasum":"f32eacac5a175bea25d7fab565ab3ed8741ef56f","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.3","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"dist":{"shasum":"f32eacac5a175bea25d7fab565ab3ed8741ef56f","size":2137,"noattachment":false,"key":"/timed-out/-/timed-out-4.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/timed-out/download/timed-out-4.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/timed-out-4.0.1.tgz_1484575090971_0.24377561057917774"},"directories":{},"publish_time":1484575091638,"_cnpm_publish_time":1484575091638,"_hasShrinkwrap":false},"4.0.0":{"name":"timed-out","version":"4.0.0","description":"Emit `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged","license":"MIT","repository":{"type":"git","url":"git+https://github.com/floatdrop/timed-out.git"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && mocha"},"files":["index.js"],"keywords":["http","https","get","got","url","uri","request","util","utility","simple"],"devDependencies":{"mocha":"*","xo":"^0.16.0"},"gitHead":"41347e64b682558f5d6fcd4afa036757eedb7c00","bugs":{"url":"https://github.com/floatdrop/timed-out/issues"},"homepage":"https://github.com/floatdrop/timed-out#readme","_id":"timed-out@4.0.0","_shasum":"b0fb98d7fed4f36b028698122769c07ef87a8690","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"dist":{"shasum":"b0fb98d7fed4f36b028698122769c07ef87a8690","size":2154,"noattachment":false,"key":"/timed-out/-/timed-out-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/timed-out/download/timed-out-4.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/timed-out-4.0.0.tgz_1483005585788_0.9252240823116153"},"directories":{},"publish_time":1483005586455,"_cnpm_publish_time":1483005586455,"_hasShrinkwrap":false},"3.1.3":{"name":"timed-out","version":"3.1.3","description":"Emit `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged","license":"MIT","repository":{"type":"git","url":"git+https://github.com/floatdrop/timed-out.git"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && mocha"},"files":["index.js"],"keywords":["http","https","get","got","url","uri","request","util","utility","simple"],"devDependencies":{"mocha":"*","xo":"^0.16.0"},"gitHead":"eadea0f4c2122784a6b57f657de3a16762ec153b","bugs":{"url":"https://github.com/floatdrop/timed-out/issues"},"homepage":"https://github.com/floatdrop/timed-out#readme","_id":"timed-out@3.1.3","_shasum":"95860bfcc5c76c277f8f8326fd0f5b2e20eba217","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"dist":{"shasum":"95860bfcc5c76c277f8f8326fd0f5b2e20eba217","size":2144,"noattachment":false,"key":"/timed-out/-/timed-out-3.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/timed-out/download/timed-out-3.1.3.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/timed-out-3.1.3.tgz_1482989351228_0.5811902172863483"},"directories":{},"publish_time":1482989353281,"_cnpm_publish_time":1482989353281,"_hasShrinkwrap":false},"3.1.2":{"name":"timed-out","version":"3.1.2","description":"Emit `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged","license":"MIT","repository":{"type":"git","url":"git+https://github.com/floatdrop/timed-out.git"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && mocha"},"files":["index.js"],"keywords":["http","https","get","got","url","uri","request","util","utility","simple"],"devDependencies":{"mocha":"*","xo":"^0.16.0"},"gitHead":"e8086b636ea66048aba51a3affee12e264794163","bugs":{"url":"https://github.com/floatdrop/timed-out/issues"},"homepage":"https://github.com/floatdrop/timed-out#readme","_id":"timed-out@3.1.2","_shasum":"7921a61c1591058fe696114d90b3940889dda545","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"dist":{"shasum":"7921a61c1591058fe696114d90b3940889dda545","size":2137,"noattachment":false,"key":"/timed-out/-/timed-out-3.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/timed-out/download/timed-out-3.1.2.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/timed-out-3.1.2.tgz_1482949122037_0.8534699825104326"},"directories":{},"publish_time":1482949122636,"_cnpm_publish_time":1482949122636,"_hasShrinkwrap":false},"3.1.1":{"name":"timed-out","version":"3.1.1","description":"Emit `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged","license":"MIT","repository":{"type":"git","url":"git+https://github.com/floatdrop/timed-out.git"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && mocha"},"files":["index.js"],"keywords":["http","https","get","got","url","uri","request","util","utility","simple"],"devDependencies":{"mocha":"*","xo":"^0.16.0"},"gitHead":"37ca32755d74622f3345e7b363e010ccf53b013e","bugs":{"url":"https://github.com/floatdrop/timed-out/issues"},"homepage":"https://github.com/floatdrop/timed-out#readme","_id":"timed-out@3.1.1","_shasum":"2eaaa1021888e4ce3b6ce3511fa7a8556114752b","_from":".","_npmVersion":"2.15.1","_nodeVersion":"0.12.17","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"dist":{"shasum":"2eaaa1021888e4ce3b6ce3511fa7a8556114752b","size":2155,"noattachment":false,"key":"/timed-out/-/timed-out-3.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/timed-out/download/timed-out-3.1.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/timed-out-3.1.1.tgz_1482866003533_0.7448440415319055"},"directories":{},"publish_time":1482866005410,"_cnpm_publish_time":1482866005410,"_hasShrinkwrap":false},"3.1.0":{"name":"timed-out","version":"3.1.0","description":"Emit `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged","license":"MIT","repository":{"type":"git","url":"git+https://github.com/floatdrop/timed-out.git"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && mocha"},"files":["index.js"],"keywords":["http","https","get","got","url","uri","request","util","utility","simple"],"devDependencies":{"mocha":"*","xo":"^0.16.0"},"gitHead":"b0cda2cc6e7ba845a693d028f4328af44d2bbd3b","bugs":{"url":"https://github.com/floatdrop/timed-out/issues"},"homepage":"https://github.com/floatdrop/timed-out#readme","_id":"timed-out@3.1.0","_shasum":"43b98b14bb712c9161c28f4dc1f3068d67a04ec2","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"dist":{"shasum":"43b98b14bb712c9161c28f4dc1f3068d67a04ec2","size":2070,"noattachment":false,"key":"/timed-out/-/timed-out-3.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/timed-out/download/timed-out-3.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/timed-out-3.1.0.tgz_1481717026855_0.7532401555217803"},"directories":{},"publish_time":1481717027576,"_cnpm_publish_time":1481717027576,"_hasShrinkwrap":false},"3.0.0":{"name":"timed-out","version":"3.0.0","description":"Emit `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged","license":"MIT","repository":{"type":"git","url":"git+https://github.com/floatdrop/timed-out.git"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && mocha"},"files":["index.js"],"keywords":["http","https","get","got","url","uri","request","util","utility","simple"],"devDependencies":{"mocha":"*","xo":"^0.16.0"},"gitHead":"c8521babfbaa888e76478e771dbb00b3719fbaf2","bugs":{"url":"https://github.com/floatdrop/timed-out/issues"},"homepage":"https://github.com/floatdrop/timed-out#readme","_id":"timed-out@3.0.0","_shasum":"ff88de96030ce960eabd42487db61d3add229273","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"dist":{"shasum":"ff88de96030ce960eabd42487db61d3add229273","size":1950,"noattachment":false,"key":"/timed-out/-/timed-out-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/timed-out/download/timed-out-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/timed-out-3.0.0.tgz_1474205415994_0.9712003509048373"},"directories":{},"publish_time":1474205417923,"_cnpm_publish_time":1474205417923,"_hasShrinkwrap":false},"2.0.0":{"name":"timed-out","version":"2.0.0","description":"Emit `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged","license":"MIT","repository":{"type":"git","url":"https://github.com/floatdrop/timed-out"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["http","https","get","got","url","uri","request","util","utility","simple"],"devDependencies":{"mocha":"*"},"gitHead":"2f35278f664de824923bfacf48d5e695f300bc69","bugs":{"url":"https://github.com/floatdrop/timed-out/issues"},"homepage":"https://github.com/floatdrop/timed-out","_id":"timed-out@2.0.0","_shasum":"f38b0ae81d3747d628001f41dafc652ace671c0a","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"f38b0ae81d3747d628001f41dafc652ace671c0a","size":1717,"noattachment":false,"key":"/timed-out/-/timed-out-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/timed-out/download/timed-out-2.0.0.tgz"},"directories":{},"publish_time":1417503554579,"_cnpm_publish_time":1417503554579,"_hasShrinkwrap":false},"1.0.0":{"name":"timed-out","version":"1.0.0","description":"Emit `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged","license":"MIT","repository":{"type":"git","url":"https://github.com/floatdrop/timed-out"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["http","https","get","got","url","uri","request","util","utility","simple"],"devDependencies":{"mocha":"*"},"gitHead":"ea14a4cb9842a3af5fbd65ce8f9b92b3af883bc7","bugs":{"url":"https://github.com/floatdrop/timed-out/issues"},"homepage":"https://github.com/floatdrop/timed-out","_id":"timed-out@1.0.0","_shasum":"1538ec68c00ad81dd7830d3e0df0438ad0eaa792","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"floatdrop","email":"floatdrop@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"1538ec68c00ad81dd7830d3e0df0438ad0eaa792","size":1650,"noattachment":false,"key":"/timed-out/-/timed-out-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/timed-out/download/timed-out-1.0.0.tgz"},"directories":{},"publish_time":1416597502681,"_cnpm_publish_time":1416597502681,"_hasShrinkwrap":false}},"readme":"# timed-out\n\n> Timeout HTTP/HTTPS requests\n\nEmits Error object with `code` property equal `ETIMEDOUT` or `ESOCKETTIMEDOUT` when `ClientRequest` is hanged.\n\n## Usage\n\n```js\nimport http from 'node:http';\nimport timedOut from 'timed-out';\n\nconst request = http.get('http://www.google.ru');\ntimedOut(request, 2000); // Sets a 2 seconds limit\n```\n\n## API\n\n### timedout(request, time)\n\n#### request\n\n*Required*\nType: [`ClientRequest`](https://nodejs.org/api/http.html#http_class_http_clientrequest)\n\nThe request to watch.\n\n#### time\n\n*Required*\nType: `number | object`\n\nTime in milliseconds to wait for a `connect` event on the socket and also time to wait on inactive socket.\n\nOr you can pass an object with the following fields:\n\n- `connect` - Time to wait for a connection.\n- `socket`  - Time to wait for activity on the socket.\n","_attachments":{},"homepage":"https://github.com/sindresorhus/timed-out#readme","bugs":{"url":"https://github.com/sindresorhus/timed-out/issues"},"license":"MIT"}