{"id":21905396,"url":"https://github.com/hex7c0/timeout-request","last_synced_at":"2026-04-11T00:32:40.359Z","repository":{"id":19003781,"uuid":"22226192","full_name":"hex7c0/timeout-request","owner":"hex7c0","description":"http timeout request middleware for Nodejs","archived":false,"fork":false,"pushed_at":"2024-03-25T22:51:38.000Z","size":265,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-13T19:19:46.452Z","etag":null,"topics":["nodejs","timeout","timer"],"latest_commit_sha":null,"homepage":"https://github.com/hex7c0/timeout-request","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hex7c0.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2014-07-24T18:56:34.000Z","updated_at":"2024-04-23T00:47:53.302Z","dependencies_parsed_at":"2024-04-23T00:47:45.184Z","dependency_job_id":"b0ddcf7d-f9c5-4136-bff1-1ebdaaabd507","html_url":"https://github.com/hex7c0/timeout-request","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex7c0%2Ftimeout-request","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex7c0%2Ftimeout-request/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex7c0%2Ftimeout-request/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex7c0%2Ftimeout-request/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hex7c0","download_url":"https://codeload.github.com/hex7c0/timeout-request/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244918710,"owners_count":20531686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nodejs","timeout","timer"],"created_at":"2024-11-28T16:33:12.831Z","updated_at":"2025-12-30T23:51:31.475Z","avatar_url":"https://github.com/hex7c0.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [timeout-request](https://github.com/hex7c0/timeout-request)\n\n[![NPM version](https://img.shields.io/npm/v/timeout-request.svg)](https://www.npmjs.com/package/timeout-request)\n[![Linux Status](https://img.shields.io/travis/hex7c0/timeout-request.svg?label=linux-osx)](https://travis-ci.org/hex7c0/timeout-request)\n[![Windows Status](https://img.shields.io/appveyor/ci/hex7c0/timeout-request.svg?label=windows)](https://ci.appveyor.com/project/hex7c0/timeout-request)\n[![Dependency Status](https://img.shields.io/david/hex7c0/timeout-request.svg)](https://david-dm.org/hex7c0/timeout-request)\n[![Coveralls](https://img.shields.io/coveralls/hex7c0/timeout-request.svg)](https://coveralls.io/r/hex7c0/timeout-request)\n\nSet the number of milliseconds that a script is allowed to run in [nodejs](http://nodejs.org/).\nIf this timeout is reached, `res.end()` or custom callback will be called\n\n## Installation\n\nInstall through NPM\n\n```bash\nnpm install timeout-request\n```\nor\n```bash\ngit clone git://github.com/hex7c0/timeout-request.git\n```\n\n## API\n\ninside expressjs project\n```js\nvar timeout = require('timeout-request');\n\nvar app = require('express')();\n\napp.use(timeout());\n```\n\n### timeout(options)\n\n#### options\n\n - `milliseconds` - **Number** Number of milliseconds before callback *(default \"5000\")*\n - `header` - **Boolean** If enabled, check `res._header` before callback *(default \"false\")*\n - `data` - **Object** Object passed to custom callback after `req` and `res` *(default \"null\")*\n - `callback` - **Function** Custom callback instead of `res.end` *(default \"null\")*\n\n## Examples\n\nTake a look at my [examples](examples)\n\n### [License Apache2](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex7c0%2Ftimeout-request","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhex7c0%2Ftimeout-request","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex7c0%2Ftimeout-request/lists"}