{"_id":"@sanity/timed-out","_rev":"161-360473cc4e0c006109b9ac23245da105","name":"@sanity/timed-out","dist-tags":{"latest":"4.0.2"},"versions":{"4.0.2":{"name":"@sanity/timed-out","version":"4.0.2","keywords":["http","https","get","got","url","uri","request","util","utility","simple"],"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com"},"license":"MIT","_id":"@sanity/timed-out@4.0.2","maintainers":[{"name":"judofyr","email":"judofyr@gmail.com"},{"name":"vicbergquist","email":"victoria.bergquist@gmail.com"},{"name":"rbotten","email":"rbotten@gmail.com"},{"name":"radhe_sanity","email":"radhe@sanity.io"},{"name":"evenw","email":"even@sanity.io"},{"name":"sanity-io","email":"developers@sanity.io"},{"name":"mariuslundgard","email":"studio@mariuslundgard.com"},{"name":"kmelve","email":"knut.melvaer@gmail.com"},{"name":"bjoerge","email":"bjoerge@gmail.com"},{"name":"rexxars","email":"espen@hovlandsdal.com"},{"name":"thomax","email":"thomas@sanity.io"},{"name":"skogsmaskin","email":"per.kristian.nordnes@gmail.com"},{"name":"simenss","email":"simen@bengler.no"},{"name":"kristofferj","email":"kristoffer@sanity.io"}],"homepage":"https://github.com/floatdrop/timed-out#readme","bugs":{"url":"https://github.com/floatdrop/timed-out/issues"},"dist":{"shasum":"c9f61f9a1609baa1eb3e4235a24ea2a775022cdf","tarball":"https://registry.npmjs.org/@sanity/timed-out/-/timed-out-4.0.2.tgz","fileCount":4,"integrity":"sha512-NBDKGj14g9Z+bopIvZcQKWCzJq5JSrdmzRR1CS+iyA3Gm8SnIWBfZa7I3mTg2X6Nu8LQXG0EPKXdOGozLS4i3w==","signatures":[{"sig":"MEUCICAooHz5XToCOW7b7D+P1D1xCjrprDlWMEQQTlyKNlxSAiEA/sxBM83qOzLbi+kMByuaGMf+TqprX4YefGSL/wMirGo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4116,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXxoZCRA9TVsSAnZWagAAAd4P/2XlQXTEKu8TbK5eMxaB\nRAT4vTT8Jpv95RP7bNYEqegtcJ5loKEwFKNRfdSLbThbLfo/v3axVICQkWBz\nao6FeLcVrDyBvlK0UypoLEQUgp48LbrPmIZfTuWoJM9zEttYAdecMlM1YI8e\nevYIUWSkdn1zDQye16Qu3bwoWef6RtRRLj6JMp754IBt10jEgWjy8bGVT8kI\niCkGaeXL9PmZJQD3NeEU4Cl3GDfEZHaxb9UFt9YcrOddTo70oepx/UyDHd7M\nm6k+59CUVjgKpKRLxIPsSE2LxIKlJrh55tD5TgpYfh8YP/js10AjTnEq9lOQ\npoKdsTbyWZHHU16Uh65U4aos5NHdQihaRAg+FH2YaWnSY+2yJapypkBQUFHh\nR/6jrJsZ4HqctWk/5Wq5g10QyZhruAEWnhUUP18c6826Lq0g7Jt99uk878mm\n88vN1dfJEHpDFs3sWcQ8f0TbNTR/C3AFitnMhJCtNIB2TjpXKDx40bNewEaC\nBLZCF81BpSiC4rto84z4MYmh7LgUmrHmEp8vQ9l01RQnaayL8eXU2+9PjlHO\nsBM499wHMpsMvHzG9rMGPO39ZTPD3o+fwVeLQ60CEy9higMdqvTDPj6iiQiF\n9uJ8i3toCQcSRIMCmZjaLGPnb3WeEE1zWmcX+/iKvbK0kikgH1VBRlPWVJ21\nwjBu\r\n=pm2v\r\n-----END PGP SIGNATURE-----\r\n"},"engines":{"node":">=0.10.0"},"gitHead":"50999c542c302df6108df969503adecf9fef73cc","scripts":{"test":"xo && mocha"},"_npmUser":{"name":"rexxars","email":"espen@hovlandsdal.com"},"repository":{"url":"git+https://github.com/floatdrop/timed-out.git","type":"git"},"_npmVersion":"6.9.0","description":"Emit `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged","directories":{},"_nodeVersion":"12.6.0","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.16.0","mocha":"*"},"_npmOperationalInternal":{"tmp":"tmp/timed-out_4.0.2_1566513688452_0.6644626451396975","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-08-22T22:41:28.451Z","modified":"2026-04-08T15:15:24.351Z","4.0.2":"2019-08-22T22:41:28.617Z"},"bugs":{"url":"https://github.com/floatdrop/timed-out/issues"},"author":{"name":"Vsevolod Strukchinsky","email":"floatdrop@gmail.com"},"license":"MIT","homepage":"https://github.com/floatdrop/timed-out#readme","keywords":["http","https","get","got","url","uri","request","util","utility","simple"],"repository":{"url":"git+https://github.com/floatdrop/timed-out.git","type":"git"},"description":"Emit `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged","maintainers":[{"email":"svc.npm@sanity.io","name":"sanity-svc.npm"},{"email":"developers@sanity.io","name":"sanity-io"}],"readme":"# timed-out [![Build Status](https://travis-ci.org/floatdrop/timed-out.svg?branch=master)](https://travis-ci.org/floatdrop/timed-out)\n\n> Timeout HTTP/HTTPS requests\n\nEmit Error object with `code` property equal `ETIMEDOUT` or `ESOCKETTIMEDOUT` when ClientRequest is hanged.\n\n## Usage\n\n```js\nvar get = require('http').get;\nvar timeout = require('timed-out');\n\nvar req = get('http://www.google.ru');\ntimeout(req, 2000); // Set 2 seconds limit\n```\n\n### API\n\n#### timedout(request, time)\n\n##### request\n\n*Required*  \nType: [`ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest)\n\nThe request to watch on.\n\n##### time\n\n*Required*  \nType: `number` or `object`\n\nTime in milliseconds to wait for `connect` event on socket and also time to wait on inactive socket.\n\nOr you can pass Object with following fields:\n\n- `connect` - time to wait for connection\n- `socket`  - time to wait for activity on socket\n\n## License\n\nMIT © [Vsevolod Strukchinsky](floatdrop@gmail.com)\n","readmeFilename":"readme.md"}