{"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","tarball":"http://registry-npm.ywwl.com/timed-out/download/timed-out-3.1.3.tgz","integrity":"sha512-3RB4qgvPkxF/FGPnrzaWLhW1rxNK2sdH0mFjbhxkfTR6QXvcM3EtYm9L44UrhODZrZ+yhDXeMncLqi8QXn2MJg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFYOtHxuTmSi/g8gInwiframs1w3ZU+oybvXwYSSikpPAiEAqvl+nBJ4l4jnlovUUeq5noMT2VBHh283QcqpuHm2L+o="}],"size":2144,"noattachment":false,"key":"/timed-out/-/timed-out-3.1.3.tgz"},"maintainers":[{"name":"floatdrop","email":"floatdrop@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/timed-out-3.1.3.tgz_1482989351228_0.5811902172863483"},"directories":{},"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\n## timed-out for enterprise\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainers of timed-out and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-timed-out?utm_source=npm-timed-out&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)\n","publish_time":1482989353281,"_cnpm_publish_time":1482989353281,"dist-tags":{"latest":"7.0.0"}}