{"id":13779306,"url":"https://github.com/koajs/etag","last_synced_at":"2025-05-15T02:05:45.673Z","repository":{"id":10606977,"uuid":"12823899","full_name":"koajs/etag","owner":"koajs","description":"ETag support for Koa responses","archived":false,"fork":false,"pushed_at":"2025-03-18T05:08:34.000Z","size":54,"stargazers_count":113,"open_issues_count":1,"forks_count":16,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-05T16:46:37.924Z","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-09-14T03:34:36.000Z","updated_at":"2025-03-18T05:08:37.000Z","dependencies_parsed_at":"2025-04-12T03:45:12.431Z","dependency_job_id":"bfb0b68a-6b5f-4f57-8d93-fcf011549e30","html_url":"https://github.com/koajs/etag","commit_stats":{"total_commits":63,"total_committers":16,"mean_commits":3.9375,"dds":0.6825396825396826,"last_synced_commit":"eda64296278650d22c31730e3f3003a5993e50af"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koajs%2Fetag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koajs%2Fetag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koajs%2Fetag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koajs%2Fetag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koajs","download_url":"https://codeload.github.com/koajs/etag/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253584492,"owners_count":21931547,"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:03.691Z","updated_at":"2025-05-15T02:05:45.618Z","avatar_url":"https://github.com/koajs.png","language":"JavaScript","readme":"# koa-etag\n\n[![NPM version][npm-image]][npm-url]\n[![Build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![Dependency Status][david-image]][david-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\nEtag support for Koa responses using [etag](https://github.com/jshttp/etag).\n\n## Installation\n\n```bash\n# npm\n$ npm install koa-etag\n# yarn\n$ yarn add koa-etag\n```\n\n## Example\n\n```js\nconst conditional = require('koa-conditional-get');\nconst compress = require('koa-compress');\nconst etag = require('koa-etag');\nconst Koa = require('koa');\nconst app = new Koa();\n\n// must be used before `conditional` and `etag`\napp.use(compress());\n\n// etag works together with conditional-get\napp.use(conditional());\napp.use(etag());\n\napp.use(function (ctx) {\n  ctx.body = 'Hello World';\n});\n\napp.listen(3000);\n\nconsole.log('listening on port 3000');\n```\n\n## License\n\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/koa-etag.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/koa-etag\n[github-tag]: http://img.shields.io/github/tag/koajs/etag.svg?style=flat-square\n[github-url]: https://github.com/koajs/etag/tags\n[travis-image]: https://img.shields.io/travis/koajs/etag.svg?style=flat-square\n[travis-url]: https://travis-ci.org/koajs/etag\n[coveralls-image]: https://img.shields.io/coveralls/koajs/etag.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/koajs/etag?branch=master\n[david-image]: http://img.shields.io/david/koajs/etag.svg?style=flat-square\n[david-url]: https://david-dm.org/koajs/etag\n[license-image]: http://img.shields.io/npm/l/koa-etag.svg?style=flat-square\n[license-url]: LICENSE\n[downloads-image]: http://img.shields.io/npm/dm/koa-etag.svg?style=flat-square\n[downloads-url]: https://npmjs.org/package/koa-etag\n[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square\n[gittip-url]: https://www.gittip.com/jonathanong/\n","funding_links":[],"categories":["Middleware","仓库"],"sub_categories":["中间件"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoajs%2Fetag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoajs%2Fetag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoajs%2Fetag/lists"}