koa-etag
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/koa-etag package

4.0.0 • Public • Published

koa-etag

NPM version Build status Test coverage Dependency Status License Downloads

Etag support for Koa responses using etag.

Installation

# npm 
$ npm install koa-etag
# yarn 
$ yarn add koa-etag

Example

const conditional = require('koa-conditional-get');
const etag = require('koa-etag');
const Koa = require('koa');
const app = new Koa();
 
// etag works together with conditional-get
app.use(conditional());
app.use(etag());
 
app.use(function (ctx) {
  ctx.body = 'Hello World';
});
 
app.listen(3000);
 
console.log('listening on port 3000');

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 4.0.0
    82,132
    • latest
  • 3.0.0
    69,901
    • next
  • 2.1.2
    487
    • v2

Version History

Package Sidebar

Install

npm i koa-etag

Weekly Downloads

152,836

Version

4.0.0

License

MIT

Unpacked Size

6.18 kB

Total Files

5

Last publish

Collaborators

  • coderhaoxin
  • niftylettuce
  • aaron
  • juliangruber
  • eivifj
  • dead_horse
  • tjholowaychuk
  • jongleberry
  • fengmk2
  • titanism