{"id":22030955,"url":"https://github.com/ts-stack/type-is","last_synced_at":"2026-01-28T00:06:39.451Z","repository":{"id":250369407,"uuid":"834267458","full_name":"ts-stack/type-is","owner":"ts-stack","description":"A fork of the widely used `type-is` library, but this one accepts headers instead of a request object.","archived":false,"fork":false,"pushed_at":"2024-09-25T10:45:38.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-30T11:51:32.901Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ts-stack.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-26T19:58:02.000Z","updated_at":"2024-09-25T10:45:41.000Z","dependencies_parsed_at":"2025-05-29T17:06:23.721Z","dependency_job_id":"4681387e-8818-44c6-a801-9a7e595f6e2d","html_url":"https://github.com/ts-stack/type-is","commit_stats":null,"previous_names":["ts-stack/type-is"],"tags_count":2,"template":false,"template_full_name":"ts-stack/starter","purl":"pkg:github/ts-stack/type-is","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ts-stack%2Ftype-is","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ts-stack%2Ftype-is/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ts-stack%2Ftype-is/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ts-stack%2Ftype-is/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ts-stack","download_url":"https://codeload.github.com/ts-stack/type-is/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ts-stack%2Ftype-is/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266694177,"owners_count":23969735,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-30T08:12:38.144Z","updated_at":"2026-01-28T00:06:30.401Z","avatar_url":"https://github.com/ts-stack.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @ts-stack/type-is\n\nInfer the content-type of a request by headers. This is a fork of [type-is](https://github.com/jshttp/type-is), but this one accepts headers instead of a request object. Writen in TypeScript in format ESM.\n\n## Install\n\n```sh\nnpm install @ts-stack/type-is\n```\n\n## Usage\n\n```ts\nimport http from 'http';\nimport { typeIs } from '@ts-stack/type-is';\n\nhttp.createServer(function (req, res) {\n  const istext = typeIs(req.headers, ['text/*'])\n  res.end('you ' + (istext ? 'sent' : 'did not send') + ' me text')\n})\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fts-stack%2Ftype-is","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fts-stack%2Ftype-is","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fts-stack%2Ftype-is/lists"}