{"id":13779202,"url":"https://github.com/koajs/conditional-get","last_synced_at":"2025-04-07T09:20:24.791Z","repository":{"id":485321,"uuid":"12831096","full_name":"koajs/conditional-get","owner":"koajs","description":"Conditional GET middleware for koa","archived":false,"fork":false,"pushed_at":"2023-06-26T16:58:59.000Z","size":26,"stargazers_count":61,"open_issues_count":3,"forks_count":12,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-29T15:32:20.395Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/koajs.png","metadata":{"files":{"readme":"README.md","changelog":"History.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}},"created_at":"2013-09-14T15:11:55.000Z","updated_at":"2024-07-18T22:55:20.000Z","dependencies_parsed_at":"2023-07-05T14:56:44.263Z","dependency_job_id":null,"html_url":"https://github.com/koajs/conditional-get","commit_stats":{"total_commits":36,"total_committers":10,"mean_commits":3.6,"dds":0.6666666666666667,"last_synced_commit":"a4d1a0f5d9cfb6f9fcf3baab54dbd5ca17611cda"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koajs%2Fconditional-get","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koajs%2Fconditional-get/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koajs%2Fconditional-get/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koajs%2Fconditional-get/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koajs","download_url":"https://codeload.github.com/koajs/conditional-get/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601446,"owners_count":20964866,"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":[],"created_at":"2024-08-03T18:01:02.447Z","updated_at":"2025-04-07T09:20:24.757Z","avatar_url":"https://github.com/koajs.png","language":"JavaScript","readme":"\n# koa-conditional-get \n\n[![Build Status](https://travis-ci.org/koajs/conditional-get.png)](https://travis-ci.org/koajs/conditional-get)\n\nConditional GET support for koa.\n\n\n## Installation\n\n```bash\n# npm\n$ npm install koa-conditional-get\n# yarn\n$ yarn add koa-conditional-get\n```\n\n\n## Example\n\n```js\nconst conditional = require('koa-conditional-get');\nconst etag = require('koa-etag');\nconst Koa = require('koa');\nconst app = new Koa();\n\n// use it upstream from etag so\n// that they are present\napp.use(conditional());\n\n// add etags\napp.use(etag());\n\n// respond\napp.use(async function(ctx, next){\n  await next();\n\n  ctx.body = {\n    name: 'tobi',\n    species: 'ferret',\n    age: 2\n  };\n})\n\napp.listen(\n  3000,\n  console.log('listening on port 3000')\n)\n```\n\n## License\n\n[MIT](LICENSE)\n","funding_links":[],"categories":["Middleware","仓库"],"sub_categories":["中间件"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoajs%2Fconditional-get","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoajs%2Fconditional-get","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoajs%2Fconditional-get/lists"}